Struct SslAcceptor
pub struct SslAcceptor(/* private fields */);boring and crypto and std only.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§
§impl SslAcceptor
impl SslAcceptor
pub 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.
pub 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.
pub 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.
pub fn setup_accept<S>(
&self,
stream: S,
) -> Result<MidHandshakeSslStream<S>, ErrorStack>
pub fn setup_accept<S>( &self, stream: S, ) -> Result<MidHandshakeSslStream<S>, ErrorStack>
Initiates a server-side TLS handshake on a stream.
See Ssl::setup_accept for more details.
pub fn accept<S>(&self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
pub fn accept<S>(&self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
Attempts a server-side TLS handshake on a stream.
This is a convenience method which combines Self::setup_accept and
MidHandshakeSslStream::handshake.
pub fn into_context(self) -> SslContext
pub fn into_context(self) -> SslContext
Consumes the SslAcceptor, returning the inner raw SslContext.
pub fn context(&self) -> &SslContextRef
pub fn context(&self) -> &SslContextRef
Returns a shared reference to the inner raw SslContext.
Trait Implementations§
§impl Clone for SslAcceptor
impl Clone for SslAcceptor
§fn clone(&self) -> SslAcceptor
fn clone(&self) -> SslAcceptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Forget for SslAcceptor
impl Freeze for SslAcceptor
impl Move for SslAcceptor
impl RefUnwindSafe for SslAcceptor
impl Send for SslAcceptorwhere
SslContext: Send,
impl Sync for SslAcceptorwhere
SslContext: Sync,
impl Unpin for SslAcceptor
impl UnsafeUnpin for SslAcceptorwhere
*const ssl_ctx_st is !null: UnsafeUnpin,
impl UnwindSafe for SslAcceptorwhere
NonNull<ssl_ctx_st>: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more