pub struct SslAcceptor(/* private fields */);Expand description
A type which wraps server-side streams in a TLS session.
OpenSSL’s default configuration is highly insecure. This connector manages the OpenSSL structures, configuring cipher suites, session options, and more.
Implementations§
Source§impl SslAcceptor
 
impl SslAcceptor
Sourcepub fn mozilla_intermediate_v5(
    method: SslMethod,
) -> Result<SslAcceptorBuilder, ErrorStack>
 
pub fn mozilla_intermediate_v5( method: SslMethod, ) -> Result<SslAcceptorBuilder, ErrorStack>
Creates a new builder configured to connect to non-legacy clients. This should generally be considered a reasonable default choice.
This corresponds to the intermediate configuration of version 5 of Mozilla’s server side TLS recommendations. See its documentation for more details on specifics.
Sourcepub fn mozilla_modern_v5(
    method: SslMethod,
) -> Result<SslAcceptorBuilder, ErrorStack>
 
pub fn mozilla_modern_v5( method: SslMethod, ) -> Result<SslAcceptorBuilder, ErrorStack>
Creates a new builder configured to connect to modern clients.
This corresponds to the modern configuration of version 5 of Mozilla’s server side TLS recommendations. See its documentation for more details on specifics.
Requires OpenSSL 1.1.1 or LibreSSL 3.4.0 or newer.
Sourcepub fn mozilla_intermediate(
    method: SslMethod,
) -> Result<SslAcceptorBuilder, ErrorStack>
 
pub fn mozilla_intermediate( method: SslMethod, ) -> Result<SslAcceptorBuilder, ErrorStack>
Creates a new builder configured to connect to non-legacy clients. This should generally be considered a reasonable default choice.
This corresponds to the intermediate configuration of version 4 of Mozilla’s server side TLS recommendations. See its documentation for more details on specifics.
Sourcepub fn mozilla_modern(
    method: SslMethod,
) -> Result<SslAcceptorBuilder, ErrorStack>
 
pub fn mozilla_modern( method: SslMethod, ) -> Result<SslAcceptorBuilder, ErrorStack>
Creates a new builder configured to connect to modern clients.
This corresponds to the modern configuration of version 4 of Mozilla’s server side TLS recommendations. See its documentation for more details on specifics.
Sourcepub fn accept<S>(&self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
 
pub fn accept<S>(&self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
Initiates a server-side TLS session on a stream.
Sourcepub fn into_context(self) -> SslContext
 
pub fn into_context(self) -> SslContext
Consumes the SslAcceptor, returning the inner raw SslContext.
Sourcepub fn context(&self) -> &SslContextRef
 
pub fn context(&self) -> &SslContextRef
Returns a shared reference to the inner raw SslContext.
Trait Implementations§
Source§impl Clone for SslAcceptor
 
impl Clone for SslAcceptor
Source§fn clone(&self) -> SslAcceptor
 
fn clone(&self) -> SslAcceptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more