Struct openssl::ssl::SslContextBuilder [] [src]

pub struct SslContextBuilder(_);

A builder for SslContexts.

Methods

impl SslContextBuilder
[src]

Configures the certificate verification method for new connections.

Configures the certificate verification method for new connections and registers a verification callback.

Configures the server name indication (SNI) callback for new connections

Obtain the server name with servername then set the corresponding context with set_ssl_context

Sets verification depth

Use the default locations of trusted certificates for verification.

These locations are read from the SSL_CERT_FILE and SSL_CERT_DIR environment variables if present, or defaults specified at OpenSSL build time otherwise.

Specifies the file that contains trusted CA certificates.

Sets the list of CAs sent to the client.

The CA certificates must still be added to the trust root.

Set the context identifier for sessions

This value identifies the server's session cache to a clients, telling them when they're able to reuse sessions. Should be set to a unique value per server, unless multiple servers share a session cache.

This value should be set when using client certificates, or each request will fail handshake and need to be restarted.

Loads a certificate from a file.

Loads a certificate chain from a file.

The file should contain a sequence of PEM-formatted certificates, the first being the leaf certificate, and the remainder forming the chain of certificates up to and including the trusted root certificate.

Sets the certificate.

Appends a certificate to the certificate chain.

This chain should contain all certificates necessary to go from the certificate specified by set_certificate to a trusted root.

Loads the private key from a file.

Sets the private key.

Sets the cipher configuration.

See man 1 ciphers for details on the format.

Set the protocols to be used during Next Protocol Negotiation (the protocols supported by the application).

Checks consistency between the private key and certificate.

Returns a shared reference to the context's certificate store.

Returns a mutable reference to the context's certificate store.

Trait Implementations

impl Sync for SslContextBuilder
[src]

impl Send for SslContextBuilder
[src]

impl Drop for SslContextBuilder
[src]

A method called when the value goes out of scope. Read more