跳到主要内容

WebPkiServerVerifier

结构体 WebPkiServerVerifier 

Source
pub struct WebPkiServerVerifier { /* private fields */ }
展开描述

默认的 ServerCertVerifier,请参阅 trait 实现以获取更多信息。

实现§

Source§

impl WebPkiServerVerifier

Source

pub fn builder(roots: Arc<RootCertStore>) -> ServerCertVerifierBuilder

创建一个 builder 用于 the webpki server certificate verifier configuration using the process-default CryptoProvider

服务器证书 – 将使用提供的 roots 中的信任锚点进行验证 –

Use Self::builder_with_provider if you wish 到 specify an explicit provider.

更多信息请参阅 ServerCertVerifierBuilder 文档。

Source

pub fn builder_with_provider( roots: Arc<RootCertStore>, provider: Arc<CryptoProvider>, ) -> ServerCertVerifierBuilder

创建一个 builder 用于 the webpki server certificate verifier configuration using 一个 specified CryptoProvider

服务器证书 – 将使用提供的 roots 中的信任锚点进行验证 –

此 cryptography 用 comes 从 the specified CryptoProvider

更多信息请参阅 ServerCertVerifierBuilder 文档。

Trait 实现§

Source§

impl Debug for WebPkiServerVerifier

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

使用给定的格式化器格式化此值。 更多信息
Source§

impl ServerCertVerifier for WebPkiServerVerifier

Source§

fn verify_server_cert( &self, end_entity: &CertificateDer<'_>, intermediates: &[CertificateDer<'_>], server_name: &ServerName<'_>, ocsp_response: &[u8], now: UnixTime, ) -> Result<ServerCertVerified, Error>

Will 验证 证书 is valid in the following ways:

  • Signed by a trusted RootCertStore CA
  • Not Expired
  • Valid for DNS entry
  • Valid revocation status (if applicable).

Depending on the verifier’s configuration revocation status checking may be performed 用于 each certificate in the chain 到 一个 root CA (excluding the root itself), 或 only the end entity certificate. Similarly, unknown revocation status may be treated as an error 或 allowed based on configuration.

Source§

fn verify_tls12_signature( &self, message: &[u8], cert: &CertificateDer<'_>, dss: &DigitallySignedStruct, ) -> Result<HandshakeSignatureValid, Error>

验证 签名 allegedly by the given server certificate. 更多信息
Source§

fn verify_tls13_signature( &self, message: &[u8], cert: &CertificateDer<'_>, dss: &DigitallySignedStruct, ) -> Result<HandshakeSignatureValid, Error>

验证 签名 allegedly by the given server certificate. 更多信息
Source§

fn supported_verify_schemes(&self) -> Vec<SignatureScheme>

返回此验证器将处理的 SignatureScheme 列表, in verify_tls12_signatureverify_tls13_signature calls. 更多信息
Source§

fn requires_raw_public_keys(&self) -> bool

返回此验证器是否要求 in RFC 7250.
Source§

fn root_hint_subjects(&self) -> Option<&[DistinguishedName]>

Return the DistinguishedNames of certificate authorities that this verifier trusts. 更多信息

自动 Trait 实现§

Blanket 实现§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. 更多信息
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows 从 an owned value. 更多信息
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows 从 an owned value. 更多信息
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

原样返回传入的参数。

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::从(self)

That is, this conversion is whatever the implementation of From<T> 用于 U 的实现方式。

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

转换出错时返回的类型。
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

执行转换。
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

转换出错时返回的类型。
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

执行转换。