pub struct PeerClientVerifier { /* private fields */ }Expand description
Verifies the certificate a client presents to a listening server.
With a store-backed pin set, a certificate that is neither pinned nor trusted by the CA
policy is not refused when it is presented: rustls calls
verify_client_cert before the client’s
CertificateVerify signature, so the client has not yet shown it holds the key. The decision
is deferred to the signature check, which records the certificate as waiting only once the
signature verifies, and then refuses the handshake.
Implementations§
Source§impl PeerClientVerifier
impl PeerClientVerifier
Sourcepub fn builder(trust: &Trust) -> PeerClientVerifierBuilder
pub fn builder(trust: &Trust) -> PeerClientVerifierBuilder
A builder for the verifier a server uses for client certificates under trust.
Trait Implementations§
Source§impl ClientCertVerifier for PeerClientVerifier
impl ClientCertVerifier for PeerClientVerifier
Source§fn root_hint_subjects(&self) -> &[DistinguishedName]
fn root_hint_subjects(&self) -> &[DistinguishedName]
Source§fn verify_client_cert(
&self,
certificate: &CertificateDer<'_>,
intermediates: &[CertificateDer<'_>],
now: UnixTime,
) -> Result<ClientCertVerified, Error>
fn verify_client_cert( &self, certificate: &CertificateDer<'_>, intermediates: &[CertificateDer<'_>], now: UnixTime, ) -> Result<ClientCertVerified, Error>
Verify the end-entity certificate
end_entity is valid, acceptable,
and chains to at least one of the trust anchors trusted by
this verifier. Read moreSource§fn verify_tls12_signature(
&self,
message: &[u8],
certificate: &CertificateDer<'_>,
signed: &DigitallySignedStruct,
) -> Result<HandshakeSignatureValid, Error>
fn verify_tls12_signature( &self, message: &[u8], certificate: &CertificateDer<'_>, signed: &DigitallySignedStruct, ) -> Result<HandshakeSignatureValid, Error>
Verify a signature allegedly by the given client certificate. Read more
Source§fn verify_tls13_signature(
&self,
message: &[u8],
certificate: &CertificateDer<'_>,
signed: &DigitallySignedStruct,
) -> Result<HandshakeSignatureValid, Error>
fn verify_tls13_signature( &self, message: &[u8], certificate: &CertificateDer<'_>, signed: &DigitallySignedStruct, ) -> Result<HandshakeSignatureValid, Error>
Verify a signature allegedly by the given client certificate. Read more
Source§fn supported_verify_schemes(&self) -> Vec<SignatureScheme>
fn supported_verify_schemes(&self) -> Vec<SignatureScheme>
Return the list of SignatureSchemes that this verifier will handle,
in
verify_tls12_signature and verify_tls13_signature calls. Read moreSource§fn requires_raw_public_keys(&self) -> bool
fn requires_raw_public_keys(&self) -> bool
Returns whether this verifier requires raw public keys as defined
in RFC 7250.
§fn 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.§fn client_auth_mandatory(&self) -> bool
fn client_auth_mandatory(&self) -> bool
Return
true to require a client certificate and false to make
client authentication optional.
Defaults to self.offer_client_auth().Auto Trait Implementations§
impl !Freeze for PeerClientVerifier
impl !RefUnwindSafe for PeerClientVerifier
impl !UnwindSafe for PeerClientVerifier
impl Send for PeerClientVerifier
impl Sync for PeerClientVerifier
impl Unpin for PeerClientVerifier
impl UnsafeUnpin for PeerClientVerifier
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
Mutably borrows from an owned value. Read more