pub struct Psk { /* private fields */ }
Expand description
The self-referencing struct.
Implementations
sourceimpl Psk
impl Psk
sourcepub fn with_key_bytes<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow Vec<u8>) -> ReturnType
) -> ReturnType
pub fn with_key_bytes<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow Vec<u8>) -> ReturnType
) -> ReturnType
Provides limited immutable access to key_bytes
. This method was generated because the contents of key_bytes
are immutably borrowed by other fields.
sourcepub fn borrow_key_bytes<'this>(&'this self) -> &'this Vec<u8>
pub fn borrow_key_bytes<'this>(&'this self) -> &'this Vec<u8>
Provides limited immutable access to key_bytes
. This method was generated because the contents of key_bytes
are immutably borrowed by other fields.
sourcepub fn with_spki<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow SubjectPublicKeyInfo<'this>) -> ReturnType
) -> ReturnType
pub fn with_spki<'outer_borrow, ReturnType>(
&'outer_borrow self,
user: impl for<'this> FnOnce(&'outer_borrow SubjectPublicKeyInfo<'this>) -> ReturnType
) -> ReturnType
Provides an immutable reference to spki
. This method was generated because spki
is a tail field.
sourcepub fn borrow_spki<'this>(&'this self) -> &'this SubjectPublicKeyInfo<'this>
pub fn borrow_spki<'this>(&'this self) -> &'this SubjectPublicKeyInfo<'this>
Provides an immutable reference to spki
. This method was generated because spki
is a tail field.
sourcepub fn with_spki_mut<'outer_borrow, ReturnType>(
&'outer_borrow mut self,
user: impl for<'this> FnOnce(&'outer_borrow mut SubjectPublicKeyInfo<'this>) -> ReturnType
) -> ReturnType
pub fn with_spki_mut<'outer_borrow, ReturnType>(
&'outer_borrow mut self,
user: impl for<'this> FnOnce(&'outer_borrow mut SubjectPublicKeyInfo<'this>) -> ReturnType
) -> ReturnType
Provides a mutable reference to spki
. This method was generated because spki
is a tail field. No borrow_spki_mut
function was generated because Rust’s borrow checker is currently unable to guarantee that such a method would be used safely.
Trait Implementations
sourceimpl ClientCertVerifier for Psk
impl ClientCertVerifier for Psk
end Ser/de
A ClientCertVerifier
that will ensure that every client provides a valid, expected
certificate, without any name checking.
sourcefn offer_client_auth(&self) -> bool
fn offer_client_auth(&self) -> bool
Returns true
to enable the server to request a client certificate and
false
to skip requesting a client certificate. Defaults to true
. Read more
sourcefn client_auth_mandatory(&self) -> Option<bool>
fn client_auth_mandatory(&self) -> Option<bool>
Return Some(true)
to require a client certificate and Some(false)
to make
client authentication optional. Return None
to abort the connection.
Defaults to Some(self.offer_client_auth())
. Read more
sourcefn client_auth_root_subjects(&self) -> Option<DistinguishedNames>
fn client_auth_root_subjects(&self) -> Option<DistinguishedNames>
Returns the subject names of the client authentication trust anchors to share with the client when requesting client authentication. Read more
sourcefn verify_client_cert(
&self,
end_entity: &Certificate,
intermediates: &[Certificate],
now: SystemTime
) -> Result<ClientCertVerified, Error>
fn verify_client_cert(
&self,
end_entity: &Certificate,
intermediates: &[Certificate],
now: SystemTime
) -> Result<ClientCertVerified, Error>
Verify the end-entity certificate end_entity
is valid for the
and chains to at least one of the trust anchors in roots
. Read more
fn verify_tls12_signature(
&self,
message: &[u8],
cert: &Certificate,
dss: &DigitallySignedStruct
) -> Result<HandshakeSignatureValid, Error>
fn verify_tls12_signature(
&self,
message: &[u8],
cert: &Certificate,
dss: &DigitallySignedStruct
) -> Result<HandshakeSignatureValid, Error>
Verify a signature allegedly by the given server certificate. Read more
fn verify_tls13_signature(
&self,
message: &[u8],
cert: &Certificate,
dss: &DigitallySignedStruct
) -> Result<HandshakeSignatureValid, Error>
fn verify_tls13_signature(
&self,
message: &[u8],
cert: &Certificate,
dss: &DigitallySignedStruct
) -> Result<HandshakeSignatureValid, Error>
Verify a signature allegedly by the given server certificate. Read more
fn supported_verify_schemes(&self) -> Vec<SignatureScheme, Global>
fn supported_verify_schemes(&self) -> Vec<SignatureScheme, Global>
Return the list of SignatureSchemes that this verifier will handle,
in verify_tls12_signature
and verify_tls13_signature
calls. Read more
sourceimpl<'de> Deserialize<'de> for Psk
impl<'de> Deserialize<'de> for Psk
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a> ServerCertVerifier for Psk
impl<'a> ServerCertVerifier for Psk
sourcefn verify_server_cert(
&self,
end_entity: &Certificate,
intermediates: &[Certificate],
server_name: &ServerName,
scts: &mut dyn Iterator<Item = &[u8]>,
ocsp_response: &[u8],
now: SystemTime
) -> Result<ServerCertVerified, Error>
fn verify_server_cert(
&self,
end_entity: &Certificate,
intermediates: &[Certificate],
server_name: &ServerName,
scts: &mut dyn Iterator<Item = &[u8]>,
ocsp_response: &[u8],
now: SystemTime
) -> Result<ServerCertVerified, Error>
Verify the end-entity certificate end_entity
is valid for the
hostname dns_name
and chains to at least one trust anchor. Read more
fn verify_tls12_signature(
&self,
message: &[u8],
cert: &Certificate,
dss: &DigitallySignedStruct
) -> Result<HandshakeSignatureValid, Error>
fn verify_tls12_signature(
&self,
message: &[u8],
cert: &Certificate,
dss: &DigitallySignedStruct
) -> Result<HandshakeSignatureValid, Error>
Verify a signature allegedly by the given server certificate. Read more
fn verify_tls13_signature(
&self,
message: &[u8],
cert: &Certificate,
dss: &DigitallySignedStruct
) -> Result<HandshakeSignatureValid, Error>
fn verify_tls13_signature(
&self,
message: &[u8],
cert: &Certificate,
dss: &DigitallySignedStruct
) -> Result<HandshakeSignatureValid, Error>
Verify a signature allegedly by the given server certificate. Read more
fn supported_verify_schemes(&self) -> Vec<SignatureScheme, Global>
fn supported_verify_schemes(&self) -> Vec<SignatureScheme, Global>
Return the list of SignatureSchemes that this verifier will handle,
in verify_tls12_signature
and verify_tls13_signature
calls. Read more
fn request_scts(&self) -> bool
fn request_scts(&self) -> bool
Returns true
if Rustls should ask the server to send SCTs. Read more
impl Eq for Psk
Auto Trait Implementations
impl RefUnwindSafe for Psk
impl Send for Psk
impl Sync for Psk
impl Unpin for Psk
impl UnwindSafe for Psk
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more