Struct WebPkiServerVerifier
pub struct WebPkiServerVerifier { /* private fields */ }tls only.Expand description
Default ServerCertVerifier, see the trait impl for more information.
Implementations§
§impl WebPkiServerVerifier
impl WebPkiServerVerifier
pub fn builder(roots: Arc<RootCertStore>) -> ServerCertVerifierBuilder
pub fn builder(roots: Arc<RootCertStore>) -> ServerCertVerifierBuilder
Create a builder for the webpki server certificate verifier configuration using
the process-default CryptoProvider.
Server certificates will be verified using the trust anchors found in the provided roots.
Use Self::builder_with_provider if you wish to specify an explicit provider.
For more information, see the ServerCertVerifierBuilder documentation.
pub fn builder_with_provider(
roots: Arc<RootCertStore>,
provider: Arc<CryptoProvider>,
) -> ServerCertVerifierBuilder
pub fn builder_with_provider( roots: Arc<RootCertStore>, provider: Arc<CryptoProvider>, ) -> ServerCertVerifierBuilder
Create a builder for the webpki server certificate verifier configuration using
a specified CryptoProvider.
Server certificates will be verified using the trust anchors found in the provided roots.
The cryptography used comes from the specified CryptoProvider.
For more information, see the ServerCertVerifierBuilder documentation.
Trait Implementations§
§impl Debug for WebPkiServerVerifier
impl Debug for WebPkiServerVerifier
§impl ServerCertVerifier for WebPkiServerVerifier
impl ServerCertVerifier for WebPkiServerVerifier
§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>
Will verify the certificate is valid in the following ways:
- Signed by a trusted
RootCertStoreCA - Not Expired
- Valid for DNS entry
- Valid revocation status (if applicable).
Depending on the verifier’s configuration revocation status checking may be performed for each certificate in the chain to a root CA (excluding the root itself), or only the end entity certificate. Similarly, unknown revocation status may be treated as an error or allowed based on configuration.
§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>
§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>
§fn supported_verify_schemes(&self) -> Vec<SignatureScheme>
fn supported_verify_schemes(&self) -> Vec<SignatureScheme>
verify_tls12_signature and verify_tls13_signature calls. Read more§fn requires_raw_public_keys(&self) -> bool
fn requires_raw_public_keys(&self) -> bool
§fn root_hint_subjects(&self) -> Option<&[DistinguishedName]>
fn root_hint_subjects(&self) -> Option<&[DistinguishedName]>
DistinguishedNames of certificate authorities that this verifier trusts. Read moreAuto Trait Implementations§
impl Freeze for WebPkiServerVerifier
impl !RefUnwindSafe for WebPkiServerVerifier
impl Send for WebPkiServerVerifier
impl Sync for WebPkiServerVerifier
impl Unpin for WebPkiServerVerifier
impl !UnwindSafe for WebPkiServerVerifier
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
§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