138 lines
4.1 KiB
Plaintext
138 lines
4.1 KiB
Plaintext
import efl_net_ssl_types;
|
|
|
|
class Efl.Net.Ssl.Context extends Efl.Object {
|
|
[[A SSL Context that is used to start a SSL socket wrapper.
|
|
|
|
The context will contain common configurations such as
|
|
certificates, private keys, certificate revocation lists (CRLs),
|
|
certificate authorities (CAs) and so on.
|
|
|
|
The method @.setup must be called once before
|
|
@Efl.Object.finalize in order to define the mandatory
|
|
operational parameters.
|
|
|
|
Note: All setter methods must be called before @Efl.Object.finalize.
|
|
|
|
@since 1.19
|
|
]]
|
|
|
|
methods {
|
|
@property default_dialer @class {
|
|
[[The default context for dialers.
|
|
|
|
It will start with:
|
|
|
|
- default_paths_load = true
|
|
- cipher = auto
|
|
- verify_mode = required
|
|
- verify_hostname = true
|
|
|
|
]]
|
|
get { }
|
|
values {
|
|
default_client_context: Efl.Net.Ssl.Context; [[Default SSL context]]
|
|
}
|
|
}
|
|
|
|
setup {
|
|
[[Defines the context mandatory operation parameters]]
|
|
params {
|
|
cipher: Efl.Net.Ssl.Cipher; [[Cipher to use, prefer @Efl.Net.Ssl.Cipher.auto]]
|
|
is_dialer: bool; [[If $true, this SSL context is targeted at dialers connecting to a remote serer]]
|
|
}
|
|
}
|
|
|
|
@property certificates {
|
|
[[The list of paths to certificates to use.
|
|
|
|
Can only be set during object construction!
|
|
]]
|
|
values {
|
|
paths: iterator<string> @owned; [[Path list for certificates]]
|
|
}
|
|
}
|
|
|
|
@property private_keys {
|
|
[[The list of paths to private keys to use.
|
|
|
|
Can only be set during object construction!
|
|
]]
|
|
values {
|
|
paths: iterator<string> @owned; [[Path list for private keys]]
|
|
}
|
|
}
|
|
|
|
@property certificate_revocation_lists {
|
|
[[The list of paths to CRL (certificate revocation list) to use.
|
|
|
|
Can only be set during object construction!
|
|
]]
|
|
values {
|
|
paths: iterator<string> @owned; [[Path list for CRL's]]
|
|
}
|
|
}
|
|
|
|
@property certificate_authorities {
|
|
[[The list of paths to CA (certificate authoritie) to use.
|
|
|
|
Can only be set during object construction!
|
|
]]
|
|
values {
|
|
paths: iterator<string> @owned; [[Path list for CA's]]
|
|
}
|
|
}
|
|
|
|
@property default_paths_load {
|
|
[[If $true, will use system's default certificate storage
|
|
|
|
Can only be set during object construction!
|
|
]]
|
|
values {
|
|
default_paths_load: bool; [[$if true use system default paths for loading, $false otherwise]]
|
|
}
|
|
}
|
|
|
|
@property verify_mode {
|
|
[[How to verify the remote peer.]]
|
|
values {
|
|
verify_mode: Efl.Net.Ssl.Verify_Mode; [[Remote verification mode]]
|
|
}
|
|
}
|
|
|
|
@property hostname_verify {
|
|
[[Defines if hostname should be verified.
|
|
|
|
This will check the socket hostname (without the port in
|
|
case of an IP) or the overriden value from
|
|
@.hostname.
|
|
]]
|
|
values {
|
|
hostname_verify: bool; [[$true if the hostname will be verified, $false otherwise]]
|
|
}
|
|
}
|
|
|
|
@property hostname {
|
|
[[Defines the hostname to use for sockets.
|
|
|
|
This is useful to avoid replicating a hostname in all
|
|
socket wrapper with hostname_override.
|
|
|
|
If NULL, then sockets wrappers will will fetch from
|
|
adopted socket using address_remote or
|
|
address_dial.
|
|
|
|
It's only used if @.hostname_verify is $true.
|
|
]]
|
|
values {
|
|
hostname: string @nullable; [[Hostname for this socket]]
|
|
}
|
|
}
|
|
}
|
|
|
|
implements {
|
|
Efl.Object.constructor;
|
|
Efl.Object.destructor;
|
|
Efl.Object.finalize;
|
|
}
|
|
}
|