pub enum AttestationError {
Validation(String),
InvalidPcrLength {
idx: usize,
len: usize,
},
InvalidPcrHex(usize),
InvalidControlPubkey,
PayloadBindingMismatch,
InvalidControlNonce,
PcrsNotExpected,
}Expand description
Errors from attestation verification.
Variants§
Validation(String)
Parse/structure/signature/PCR/nonce validation failed in the
upstream attestation-doc-validation crate. Carries the original
error rendered to a string — the upstream type is non-exhaustive
and not worth re-exporting.
InvalidPcrLength
A PCR value coming out of the validated document hex-decoded to something other than 32/48/64 bytes, which would break PcrKey derivation. Should be unreachable for real Nitro docs.
InvalidPcrHex(usize)
A PCR slot was not hex-encoded. Should be unreachable: the upstream crate is the one that hex-encodes them on the way out.
InvalidControlPubkey
The doc’s user_data field is missing or not a 65-byte
uncompressed SEC1 ECDSA P-256 verifying key. Required by
verify_and_extract — the synchronizer needs the control
pubkey to verify Transition signatures later in the session.
PayloadBindingMismatch
The doc’s user_data field is missing or not the 32-byte
SHA-256 hash of the chain link’s payload. Required by
verify_chain_attestation — every chain link binds its
attestation.user_data to sha256(payload), so any mismatch
means either the payload or the attestation has been swapped.
InvalidControlNonce
The doc’s user_data field is missing or not exactly 32 bytes
where a control nonce was expected. Returned by
verify_control_nonce_attestation: the in-enclave server’s
RequestAttestation reply always embeds the current 32-byte
control nonce as user_data, so any other shape means the
document was produced for a different purpose (or tampered with).
PcrsNotExpected
The document verified (structure, signature, nonce binding) but
its PCR0/1/2 equal NONE of the caller’s expected triples.
Returned by verify_and_extract_pcrs: the presenting enclave
is genuine but is not the identity the caller trusts
(server authentication).
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
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()