pub enum ChainValidationError {
Show 20 variants
Attestation(AttestationError),
EmptyAttestation,
PayloadDecode {
kind: ChainLinkKind,
msg: String,
},
EnclaveIdMismatch,
PcrMismatch,
ImageDigestMismatch,
BootHasSignature,
SignatureMissing(ChainLinkKind),
BadControlPubkey(String),
SignatureShape,
SignatureInvalid,
NonUpgradableSigned(ChainLinkKind),
NonUpgradableSecondBoot,
NoGenesisYet,
RevokeTargetMissing,
RevokeTargetWrongKind(ChainLinkKind),
RevokePastActivation,
AlreadyRevoked,
CorruptStoredPayload(ChainLinkKind, String),
CorruptStoredPcrHex(usize),
}Expand description
All ways a chain link can fail validation.
Variants§
Attestation(AttestationError)
Bottom-line attestation verification (see
super::attestation::verify_chain_attestation).
EmptyAttestation
attestation byte vec is empty.
PayloadDecode
CBOR-decode of payload failed against the kind’s struct.
EnclaveIdMismatch
payload.enclave_id does not match the validator’s context.
PcrMismatch
Boot link claims PCRs that disagree with what the backend recorded post-build.
ImageDigestMismatch
Boot link’s image_digest disagrees with enclaves.image_digest.
BootHasSignature
Boot link presented a signature. Boot links carry no
signature.
SignatureMissing(ChainLinkKind)
Upgrade / revocation link is missing the signature field.
BadControlPubkey(String)
The control_public_key on enclaves did not decode as
uncompressed SEC1 P-256. Indicates DB-side drift; user-facing
error class should map to 500.
SignatureShape
signature is not 64 bytes raw r||s.
SignatureInvalid
signature does not verify against the enclave’s control
pubkey.
NonUpgradableSigned(ChainLinkKind)
Upgrade / revocation submitted on a non-upgradable enclave.
NonUpgradableSecondBoot
Boot of a fresh image digest on a non-upgradable enclave.
NoGenesisYet
Upgrade or revocation submitted before any genesis boot exists.
RevokeTargetMissing
Revocation’s revokes does not resolve to any entry on the
chain context.
RevokeTargetWrongKind(ChainLinkKind)
Revocation’s revokes points at a non-upgrade link.
RevokePastActivation
Revoked upgrade is past valid_from. Pre-activation revoke only.
AlreadyRevoked
Another revocation on this chain already targets the same upgrade.
CorruptStoredPayload(ChainLinkKind, String)
A stored chain entry’s payload no longer CBOR-decodes (DB-side drift). Maps to 500.
CorruptStoredPcrHex(usize)
A stored PCR string is not hex (DB-side drift). Maps to 500.
Trait Implementations§
Source§impl Debug for ChainValidationError
impl Debug for ChainValidationError
Source§impl Display for ChainValidationError
impl Display for ChainValidationError
Source§impl Error for ChainValidationError
impl Error for ChainValidationError
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()