Struct security_framework::secure_transport::ClientBuilder
source · [−]pub struct ClientBuilder { /* private fields */ }
Expand description
A builder type to simplify the creation of client side SslStream
s.
Implementations
Specifies the set of root certificates to trust when verifying the server’s certificate.
Add the certificate the set of root certificates to trust when verifying the server’s certificate.
Specifies whether to trust the built-in certificates in addition to specified anchor certificates.
Specifies whether to trust invalid certificates.
Warning
You should think very carefully before using this method. If invalid certificates are trusted, any certificate for any site will be trusted for use. This includes expired certificates. This introduces significant vulnerabilities, and should only be used as a last resort.
Specifies whether to use Server Name Indication (SNI).
pub fn danger_accept_invalid_hostnames(
&mut self,
danger_accept_invalid_hostnames: bool
) -> &mut Self
pub fn danger_accept_invalid_hostnames(
&mut self,
danger_accept_invalid_hostnames: bool
) -> &mut Self
Specifies whether to verify that the server’s hostname matches its certificate.
Warning
You should think very carefully before using this method. If hostnames are not verified, any valid certificate for any site will be trusted for use. This introduces significant vulnerabilities, and should only be used as a last resort.
Set a whitelist of enabled ciphers. Any ciphers not whitelisted will be disabled.
Set a blacklist of disabled ciphers. Blacklisted ciphers will be disabled.
Use the specified identity as a SSL/TLS client certificate.
Configure the minimum protocol that this client will support.
Configure the minimum protocol that this client will support.
Initiates a new SSL/TLS session over a stream connected to the specified domain.
If both SNI and hostname verification are disabled, the value of domain
will be ignored.