pub enum CredentialError {
Malformed,
BadSignature,
NotYetValid,
Expired,
UnsupportedVersion(u16),
BadSubjectKey,
UnknownIssuer,
WrongTrustDomain,
}Expand description
Reasons a credential fails to parse or verify. tag() yields a
stable machine string for structured logging + JSON error bodies
(mirrors federation::signing::VerifyError).
Variants§
Malformed
Wire bytes (or base64) could not be parsed into the expected shape.
BadSignature
The issuer signature did not verify against the trust bundle.
NotYetValid
now < not_before — the credential is not yet valid.
Expired
now > not_after — the credential has expired.
UnsupportedVersion(u16)
The credential’s cred_version is newer than this binary understands.
BadSubjectKey
subject_pubkey is not a valid Edwards-curve point.
UnknownIssuer
The credential’s issuer_id is not present in the trust bundle, so
no key is available to verify its signature against.
WrongTrustDomain
The credential’s trust_domain does not match the domain the
receiving trust bundle is scoped to (multi-tenant isolation).
Implementations§
Trait Implementations§
Source§impl Clone for CredentialError
impl Clone for CredentialError
Source§fn clone(&self) -> CredentialError
fn clone(&self) -> CredentialError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CredentialError
impl Debug for CredentialError
Source§impl Display for CredentialError
impl Display for CredentialError
impl Eq for CredentialError
Source§impl Error for CredentialError
impl Error for CredentialError
1.30.0 · 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 From<CredentialError> for ChainError
impl From<CredentialError> for ChainError
Source§fn from(e: CredentialError) -> Self
fn from(e: CredentialError) -> Self
Source§impl From<CredentialError> for IssuerError
impl From<CredentialError> for IssuerError
Source§fn from(e: CredentialError) -> Self
fn from(e: CredentialError) -> Self
Source§impl PartialEq for CredentialError
impl PartialEq for CredentialError
Source§fn eq(&self, other: &CredentialError) -> bool
fn eq(&self, other: &CredentialError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CredentialError
Auto Trait Implementations§
impl Freeze for CredentialError
impl RefUnwindSafe for CredentialError
impl Send for CredentialError
impl Sync for CredentialError
impl Unpin for CredentialError
impl UnsafeUnpin for CredentialError
impl UnwindSafe for CredentialError
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<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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§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 moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.