pub enum ChainReject {
Empty,
Edge {
index: usize,
reason: DerivationReject,
},
RootNotTerminal {
index: usize,
},
NonRootTerminus,
UntrustedRoot {
found: GrantId,
expected: GrantId,
},
CidUnavailable,
}Expand description
Why a derivation chain is not trusted.
Variants§
Empty
An empty chain proves nothing (fail-closed).
Edge
Edge index (child chain[index] → parent chain[index + 1]) failed
check_derivation for the carried reason.
RootNotTerminal
chain[index] is a Derivation::Root but is not the terminus — a root
may only appear at the end of a chain (it derives from nothing).
NonRootTerminus
The terminus is not a Derivation::Root: the chain does not bottom out
at a self-standing root, so there is nothing to anchor trust to.
UntrustedRoot
The chain is structurally valid and terminates at a root, but that root is not the externally-configured trusted anchor. Structural validity is not trust: a CID identifies, it does not authorize. This is the reject that stops an attacker’s self-authored, internally-consistent chain.
A CID needed to anchor the chain could not be computed (fail-closed).
Trait Implementations§
Source§impl Clone for ChainReject
impl Clone for ChainReject
Source§fn clone(&self) -> ChainReject
fn clone(&self) -> ChainReject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more