struct Verifier(Arc<WebPkiServerVerifier>);
Available on (crate features
native-tls
or rustls
) and (crate features async-std
or tokio
) and crate feature rustls
only.Expand description
A [rustls::client::danger::ServerCertVerifier
] based on the Rustls’s [WebPkiServerVerifier
].
This verifier is necessary since Tor relays doesn’t participate in the web browser PKI, and as such their certificates won’t check out as valid ones.
We enforce that the certificate itself has correctly authenticated the TLS connection, but nothing else.
Tuple Fields§
§0: Arc<WebPkiServerVerifier>
Implementations§
Trait Implementations§
Source§impl ServerCertVerifier for Verifier
impl ServerCertVerifier for Verifier
Source§fn verify_server_cert(
&self,
end_entity: &CertificateDer<'_>,
_roots: &[CertificateDer<'_>],
_server_name: &ServerName<'_>,
_ocsp_response: &[u8],
_now: UnixTime,
) -> Result<ServerCertVerified, TLSError>
fn verify_server_cert( &self, end_entity: &CertificateDer<'_>, _roots: &[CertificateDer<'_>], _server_name: &ServerName<'_>, _ocsp_response: &[u8], _now: UnixTime, ) -> Result<ServerCertVerified, TLSError>
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, TLSError>
fn verify_tls12_signature( &self, message: &[u8], cert: &CertificateDer<'_>, dss: &DigitallySignedStruct, ) -> Result<HandshakeSignatureValid, TLSError>
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, TLSError>
fn verify_tls13_signature( &self, message: &[u8], cert: &CertificateDer<'_>, dss: &DigitallySignedStruct, ) -> Result<HandshakeSignatureValid, TLSError>
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 moreSource§fn root_hint_subjects(&self) -> Option<&[DistinguishedName]>
fn root_hint_subjects(&self) -> Option<&[DistinguishedName]>
Return the [
DistinguishedName
]s of certificate authorities that this verifier trusts. 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 Verifier
impl !RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl !UnwindSafe for Verifier
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