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>>
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 moreAuto Trait Implementations§
impl Freeze for SslAcceptor
impl RefUnwindSafe for SslAcceptor
impl Send for SslAcceptor
impl Sync for SslAcceptor
impl Unpin for SslAcceptor
impl UnwindSafe for SslAcceptor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)