pub enum AttestationError {
Canonical(Error),
HashMismatch {
expected: String,
actual: String,
},
BadSignature,
InvalidBase64(DecodeError),
WrongSignatureLength(usize),
UnsupportedAlgorithm(String),
UntrustedKey(String),
}Expand description
Anything that can go wrong inside the crate.
Variants§
Canonical(Error)
Serialising the input doc to canonical JSON failed.
HashMismatch
signed_hash didn’t match the recomputed canonical hash for the body
supplied at verify time.
Fields
BadSignature
Signature didn’t validate against the public key.
InvalidBase64(DecodeError)
Base64 decoding the signature field failed.
WrongSignatureLength(usize)
Signature bytes weren’t 64 bytes after decode.
UnsupportedAlgorithm(String)
The attestation declared algorithm we don’t know how to verify.
UntrustedKey(String)
The caller asked crate::Verifier::verify for a key URL that
wasn’t in the trust set.
Trait Implementations§
Source§impl Debug for AttestationError
impl Debug for AttestationError
Source§impl Display for AttestationError
impl Display for AttestationError
Source§impl Error for AttestationError
impl Error for AttestationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<DecodeError> for AttestationError
impl From<DecodeError> for AttestationError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AttestationError
impl !RefUnwindSafe for AttestationError
impl Send for AttestationError
impl Sync for AttestationError
impl Unpin for AttestationError
impl UnsafeUnpin for AttestationError
impl !UnwindSafe for AttestationError
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