Struct openssl::ssl::SslAcceptor
source · [−]pub struct SslAcceptor(_);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
sourceimpl 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 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
sourceimpl Clone for SslAcceptor
impl Clone for SslAcceptor
sourcefn clone(&self) -> SslAcceptor
fn clone(&self) -> SslAcceptor
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for SslAcceptor
impl Send for SslAcceptor
impl Sync for SslAcceptor
impl Unpin for SslAcceptor
impl UnwindSafe for SslAcceptor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more