#[non_exhaustive]pub enum VerificationError<'a> {
MissingKey {
sig: &'a Signature,
},
UnboundKey {
sig: &'a Signature,
cert: &'a Cert,
error: Error,
},
BadKey {
sig: &'a Signature,
ka: ValidKeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>,
error: Error,
},
BadSignature {
sig: &'a Signature,
ka: ValidKeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>,
error: Error,
},
MalformedSignature {
sig: &'a Signature,
error: Error,
},
UnknownSignature {
sig: &'a Unknown,
},
}Expand description
A bad signature.
Represents the result of an unsuccessful signature verification. It contains all the context that could be gathered until the verification process failed.
VerificationError is used in VerificationResult. See also
GoodChecksum.
You can either explicitly match on the variants, or convert to
Error using From.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingKey
Missing Key
UnboundKey
Unbound key.
There is no valid binding signature at the time the signature was created under the given policy.
Fields
BadKey
Bad key (have a key, but it is not alive, etc.)
Fields
ka: ValidKeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>The signing key that made the signature.
BadSignature
Bad signature (have a valid key, but the signature didn’t check out)
Fields
ka: ValidKeyAmalgamation<'a, PublicParts, UnspecifiedRole, bool>The signing key that made the signature.
MalformedSignature
Malformed signature (no signature creation subpacket, etc.).
UnknownSignature
A signature that failed to parse at all.
Fields
sig: &'a UnknownThe signature parsed into an crate::packet::Unknown
packet.
Trait Implementations§
Source§impl<'a> Debug for VerificationError<'a>
impl<'a> Debug for VerificationError<'a>
Source§impl<'a> Display for VerificationError<'a>
impl<'a> Display for VerificationError<'a>
Source§impl<'a> Error for VerificationError<'a>
impl<'a> Error for VerificationError<'a>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<'a> From<VerificationError<'a>> for Error
impl<'a> From<VerificationError<'a>> for Error
Source§fn from(e: VerificationError<'a>) -> Error
fn from(e: VerificationError<'a>) -> Error
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for VerificationError<'a>
impl<'a> !UnwindSafe for VerificationError<'a>
impl<'a> Freeze for VerificationError<'a>
impl<'a> Send for VerificationError<'a>
impl<'a> Sync for VerificationError<'a>
impl<'a> Unpin for VerificationError<'a>
impl<'a> UnsafeUnpin for VerificationError<'a>
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
Source§impl<E> ExternalError for E
impl<E> ExternalError for E
fn into_lua_err(self) -> Error
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreimpl<T> MaybeSend for T
impl<T> MaybeSync for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more