#[non_exhaustive]pub enum CertFailure {
Expired,
NotYetValid,
NameMismatch {
presented: Vec<String>,
},
UnknownIssuer,
Revoked,
BadSignature,
PinMismatch,
Malformed,
Other(String),
}Expand description
Why a server’s certificate was refused.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Expired
The certificate’s validity period has ended.
NotYetValid
The certificate’s validity period has not begun.
NameMismatch
The certificate is valid, but for other names. RFC 5922 §7.3 requires the account’s SIP domain, not the host an SRV record named.
UnknownIssuer
The chain did not reach a trusted root.
Revoked
The issuer has revoked the certificate.
BadSignature
The certificate’s signature does not verify against its issuer’s key.
PinMismatch
The chain was fine, but the leaf is not the certificate pinned by
TlsPolicy::Pinned.
Malformed
The certificate could not be parsed.
Usually still carries a fingerprint: the verifier records the leaf’s
SHA-256 over the raw wire bytes before delegating to the policy
verifier that raises this failure, so under
TlsPolicy::SystemRoots a malformed
leaf still reaches you as a typed UntrustedCertificate with a
usable fingerprint — this variant exists for the narrower case where
parsing fails before that point. Under
TlsPolicy::Pinned it cannot arise at
all: that verifier compares raw bytes and never parses X.509.
Other(String)
A TLS failure this enum has no dedicated variant for. This can still
be a certificate problem — one of the less common
rustls::CertificateError variants this crate has not given its own
case — in which case the message is prefixed "certificate: ", or it
can be a non-certificate TLS failure (a protocol error, no shared
cipher suite) reported as-is.
Trait Implementations§
Source§impl Clone for CertFailure
impl Clone for CertFailure
Source§impl Debug for CertFailure
impl Debug for CertFailure
Source§impl Display for CertFailure
impl Display for CertFailure
impl Eq for CertFailure
Source§impl PartialEq for CertFailure
impl PartialEq for CertFailure
impl StructuralPartialEq for CertFailure
Auto Trait Implementations§
impl Freeze for CertFailure
impl RefUnwindSafe for CertFailure
impl Send for CertFailure
impl Sync for CertFailure
impl Unpin for CertFailure
impl UnsafeUnpin for CertFailure
impl UnwindSafe for CertFailure
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.