pub enum SignatureError {
Show 16 variants
Malformed(&'static str),
NoLabel,
MissingParameter(&'static str),
NotCovered,
Duplicate(String),
MissingComponent(String),
Algorithm(String),
Nonce,
Clock {
skew: u64,
window: u64,
},
Ahead {
ahead: u64,
allowed: u64,
},
Expired,
NoDigest,
DigestMismatch,
NotAscii,
BadSignature,
PublicKey,
}Expand description
Why a signature, or something it depends on, was not accepted. The messages are safe to show a user and name what to fix.
Variants§
Malformed(&'static str)
A header was present but did not parse.
NoLabel
Signature-Input or Signature has no member labelled LABEL.
MissingParameter(&'static str)
A parameter the server requires is absent.
NotCovered
A component Recall requires is not covered.
Duplicate(String)
A component is listed twice (RFC 9421 §2.5, step 2.1).
MissingComponent(String)
A covered component has no value in this request.
Algorithm(String)
alg names something other than ALGORITHM.
Nonce
The nonce is empty or longer than MAX_NONCE_LEN.
Clock
created is further behind the server’s clock than the window.
Ahead
created is further ahead of the server’s clock than
MAX_AHEAD_SECONDS.
Expired
expires has passed.
NoDigest
Content-Digest has no sha-256 member.
DigestMismatch
Content-Digest does not match the body received.
NotAscii
The signature base holds something that is not ASCII (§2.5, step 4).
BadSignature
The signature does not verify with the device’s key.
PublicKey
A public key is not an acceptable Ed25519 key.
Trait Implementations§
Source§impl Clone for SignatureError
impl Clone for SignatureError
Source§impl Debug for SignatureError
impl Debug for SignatureError
Source§impl Display for SignatureError
impl Display for SignatureError
impl Eq for SignatureError
Source§impl Error for SignatureError
impl Error for SignatureError
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 PartialEq for SignatureError
impl PartialEq for SignatureError
impl StructuralPartialEq for SignatureError
Auto Trait Implementations§
impl Freeze for SignatureError
impl RefUnwindSafe for SignatureError
impl Send for SignatureError
impl Sync for SignatureError
impl Unpin for SignatureError
impl UnsafeUnpin for SignatureError
impl UnwindSafe for SignatureError
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.