pub struct FingerprintVerifier {
pub fingerprints: HostCertificateFingerprints,
pub provider: CryptoProvider,
}
Expand description
A verifier for server certificates that verifies them based on fingerprints
This verifier is selected when using ConnectionSecurity::Fingerprints
and relies on
HostCertificateFingerprints
to be able to match a host certificate fingerprint against a
predefined list of fingerprints. It should be preferred over the use of DangerIgnoreVerifier
(selected by ConnectionSecurity::Unsafe
), but ideally a setup should make use of
ConnectionSecurity::Native
instead!
Fields§
§fingerprints: HostCertificateFingerprints
§provider: CryptoProvider
Trait Implementations§
source§impl Debug for FingerprintVerifier
impl Debug for FingerprintVerifier
source§impl ServerCertVerifier for FingerprintVerifier
impl ServerCertVerifier for FingerprintVerifier
source§fn verify_server_cert(
&self,
end_entity: &CertificateDer<'_>,
_intermediates: &[CertificateDer<'_>],
_server_name: &ServerName<'_>,
_ocsp_response: &[u8],
_now: UnixTime,
) -> Result<ServerCertVerified, Error>
fn verify_server_cert( &self, end_entity: &CertificateDer<'_>, _intermediates: &[CertificateDer<'_>], _server_name: &ServerName<'_>, _ocsp_response: &[u8], _now: UnixTime, ) -> 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 moresource§fn verify_tls12_signature(
&self,
message: &[u8],
cert: &CertificateDer<'_>,
dss: &DigitallySignedStruct,
) -> Result<HandshakeSignatureValid, Error>
fn verify_tls12_signature( &self, message: &[u8], cert: &CertificateDer<'_>, dss: &DigitallySignedStruct, ) -> Result<HandshakeSignatureValid, Error>
Verify a signature allegedly by the given server certificate. Read more
source§fn verify_tls13_signature(
&self,
message: &[u8],
cert: &CertificateDer<'_>,
dss: &DigitallySignedStruct,
) -> Result<HandshakeSignatureValid, Error>
fn verify_tls13_signature( &self, message: &[u8], cert: &CertificateDer<'_>, dss: &DigitallySignedStruct, ) -> Result<HandshakeSignatureValid, Error>
Verify a signature allegedly by the given server 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 more§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.
Auto Trait Implementations§
impl Freeze for FingerprintVerifier
impl !RefUnwindSafe for FingerprintVerifier
impl Send for FingerprintVerifier
impl Sync for FingerprintVerifier
impl Unpin for FingerprintVerifier
impl !UnwindSafe for FingerprintVerifier
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
Mutably borrows from an owned value. Read more