#[non_exhaustive]pub enum VerifierError {
InvalidSubstrateHeaderLength {
actual: usize,
},
InvalidSubstrateHeaderHex(String),
InvalidReceiptHeaderLength {
actual: usize,
},
InvalidReceiptHeaderHex(String),
UnsupportedReceiptVersion {
actual: u8,
expected: u8,
},
InvalidReceiptSize {
actual: usize,
expected: usize,
},
UnknownAlgorithmBits {
flags: u8,
},
PublicKeysParse(String),
PublicKeysBase64 {
field: &'static str,
detail: String,
},
UnknownAlgorithm(String),
}Expand description
Every way verification can fail to run.
A successful verify_structural
call still returns a VerificationResult
which itself may report failed checks — those are NOT
VerifierErrors. This type is reserved for inputs that are
malformed to the point where no verdict can be produced.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidSubstrateHeaderLength
The X-H33-Substrate header was not 64 hex characters.
InvalidSubstrateHeaderHex(String)
The X-H33-Substrate header contained invalid hex.
InvalidReceiptHeaderLength
The X-H33-Receipt header was not 84 hex characters.
InvalidReceiptHeaderHex(String)
The X-H33-Receipt header contained invalid hex.
UnsupportedReceiptVersion
The decoded receipt bytes had an unexpected version byte.
The expected version for this verifier build is
RECEIPT_VERSION.
Fields
InvalidReceiptSize
The decoded receipt bytes were not exactly 42 bytes.
UnknownAlgorithmBits
The receipt’s algorithm flags byte had bits set that the verifier does not recognize. This can happen when a newer server adds a fourth signature family before the verifier crate catches up. Not fatal — the recognized families still verify — but the caller should know that the full algorithm set was not inspected.
PublicKeysParse(String)
The public-keys JSON document could not be parsed.
PublicKeysBase64
A base64 value in the public-keys JSON could not be decoded.
Fields
UnknownAlgorithm(String)
An unknown algorithm string appeared in X-H33-Algorithms. The
verifier recognizes exactly these identifiers:
ML-DSA-65(Dilithium, NIST FIPS 204)FALCON-512SPHINCS+-SHA2-128f(SLH-DSA, NIST FIPS 205)
Trait Implementations§
Source§impl Debug for VerifierError
impl Debug for VerifierError
Source§impl Display for VerifierError
impl Display for VerifierError
Source§impl Error for VerifierError
impl Error for VerifierError
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<VerifierError> for Error
Available on crate feature std only.
impl From<VerifierError> for Error
std only.