pub struct ServerBuilder { /* private fields */ }Expand description
A builder type to simplify the creation of server-side SslStreams.
Implementations§
source§impl ServerBuilder
impl ServerBuilder
sourcepub fn new(identity: &SecIdentity, certs: &[SecCertificate]) -> Self
pub fn new(identity: &SecIdentity, certs: &[SecCertificate]) -> Self
Creates a new ServerBuilder which will use the specified identity
and certificate chain for handshakes.
sourcepub fn from_pkcs12(pkcs12_der: &[u8], passphrase: &str) -> Result<Self>
pub fn from_pkcs12(pkcs12_der: &[u8], passphrase: &str) -> Result<Self>
Creates a new ServerBuilder which will use the identity
from the given PKCS #12 data.
This operation fails if PKCS #12 file contains zero or more than one identity.
This is a shortcut for the most common operation.
sourcepub fn new_ssl_context(&self) -> Result<SslContext>
pub fn new_ssl_context(&self) -> Result<SslContext>
Create a SSL context for lower-level stream initialization.