Struct openssl::ssl::SslAcceptor
source · 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>>where
S: Read + Write,
pub fn accept<S>(&self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>where S: Read + Write,
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