pub enum ChainError {
MissingMac {
index: usize,
},
NotCanonicalizable {
index: usize,
},
MacMismatch {
index: usize,
},
MissingChainIndex {
index: usize,
},
UnknownKeyId {
index: usize,
key_id: String,
},
MixedWriters {
index: usize,
expected: String,
found: String,
},
IndexMismatch {
index: usize,
found: u64,
},
}Expand description
Why a chain failed to verify.
Variants§
MissingMac
The event carries no mac metadata field, or it is not a string.
NotCanonicalizable
The event could not be canonicalized for hashing.
MacMismatch
The stored MAC does not match the recomputed one: the entry was modified, or an earlier entry was altered, removed, or reordered.
MissingChainIndex
The event carries no chain_index, so its position cannot be
established. Only returned by
verify_unordered.
UnknownKeyId
The entry names a key this verifier does not hold, so it cannot be checked. Supply the key, or verify with the instance that rotated.
Fields
MixedWriters
Entries from two different writers are interleaved in one chain.
Each writer keeps its own index and previous-MAC state, so their output cannot form a single valid chain. This is a configuration mistake, not an attack, and is reported separately so it is not mistaken for one.
Fields
IndexMismatch
The event’s recorded chain index disagrees with its actual position, which indicates entries were removed or reordered.
Trait Implementations§
Source§impl Clone for ChainError
impl Clone for ChainError
Source§impl Debug for ChainError
impl Debug for ChainError
Source§impl Display for ChainError
impl Display for ChainError
impl Eq for ChainError
Source§impl Error for ChainError
impl Error for ChainError
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()