#[non_exhaustive]pub enum VerificationErrorKind {
UnsupportedAlgorithm,
UnsupportedKey,
MalformedKey,
InvalidSignature,
}Expand description
Why a SignatureVerifier did not accept a
signature.
validate_path reports InvalidSignature as
Error::SignatureInvalid and every
other kind as
Error::SignatureNotVerified.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnsupportedAlgorithm
The verifier does not implement the signature algorithm, or the algorithm’s parameters are not ones it supports (for example RSASSA-PSS with SHA-1, or ECDSA parameters present).
UnsupportedKey
The issuer’s key is well-formed but not usable with this algorithm or verifier: a different key type, an unsupported curve or size, or key parameters that forbid the signature’s parameters.
MalformedKey
The issuer’s SubjectPublicKeyInfo does not decode as a key of its
declared type.
InvalidSignature
The signature is not a well-formed signature value or does not verify under the issuer’s key.
Trait Implementations§
Source§impl Clone for VerificationErrorKind
impl Clone for VerificationErrorKind
impl Copy for VerificationErrorKind
Source§impl Debug for VerificationErrorKind
impl Debug for VerificationErrorKind
Source§impl<'de> Deserialize<'de> for VerificationErrorKind
Available on crate feature serde only.
impl<'de> Deserialize<'de> for VerificationErrorKind
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for VerificationErrorKind
impl Display for VerificationErrorKind
impl Eq for VerificationErrorKind
Source§impl From<VerificationErrorKind> for VerificationError
impl From<VerificationErrorKind> for VerificationError
Source§fn from(kind: VerificationErrorKind) -> Self
fn from(kind: VerificationErrorKind) -> Self
Converts to this type from the input type.
Source§impl Hash for VerificationErrorKind
impl Hash for VerificationErrorKind
Source§impl PartialEq for VerificationErrorKind
impl PartialEq for VerificationErrorKind
Source§impl Serialize for VerificationErrorKind
Available on crate feature serde only.
impl Serialize for VerificationErrorKind
Available on crate feature
serde only.impl StructuralPartialEq for VerificationErrorKind
Auto Trait Implementations§
impl Forget for VerificationErrorKind
impl Freeze for VerificationErrorKind
impl Move for VerificationErrorKind
impl RefUnwindSafe for VerificationErrorKind
impl Send for VerificationErrorKind
impl Sync for VerificationErrorKind
impl Unpin for VerificationErrorKind
impl UnsafeUnpin for VerificationErrorKind
impl UnwindSafe for VerificationErrorKind
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