pub enum CredentialError {
Stun(StunError),
Malformed,
BadSignature,
}Expand description
Errors classifying or verifying a DIG credential (SPEC.md §14.5-§14.6). Exhaustive: this
type is new in 0.2.0 and consumed only within this crate and by callers matching on
crate::credential::decide’s inputs, so a variant addition is tracked as an ordinary
breaking change rather than absorbed silently.
Variants§
Stun(StunError)
The datagram failed the crate’s ordinary Binding-request checks (SPEC.md §2.5) before a
single DIG attribute was inspected — truncated, bad magic cookie, wrong message type, or a
declared length that overruns the datagram.
Malformed
A DIG credential attribute violated its wire shape (§14.3.1/§14.3.2), appeared out of the
required order, was duplicated, or appeared without its required companion attribute
(SPEC.md §14.5). Maps to a 400 response.
BadSignature
The signature did not verify against the carried SPKI over the expected preimage
(SPEC.md §14.6). Maps to a 401 challenge (SPEC.md §14.7 row 6) — a bad signature is
treated exactly like an unauthenticated ask, never surfaced as a distinct wire code.
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
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()