pub struct ClientBuilder { /* private fields */ }
Expand description

A builder type to simplify the creation of client side SslStreams.

Implementations

Creates a new builder with default options.

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).

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.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.