pub enum SessionBundleError {
Show 13 variants
VersionMismatch,
InvalidSignature,
Expired,
ExpiryWindowInvariant,
CoordinatorIssuerMismatch,
AudienceMismatch,
NotMember,
MissingField(&'static str),
EmptyParticipants,
Canonicalization(String),
TctVerification(TctError),
Crypto(CryptoError),
WireFormInvalid(String),
}Expand description
Errors from session-bundle construction and verification.
Variants§
VersionMismatch
version field was not "aitp/0.2".
InvalidSignature
Outer bundle signature failed to verify against the coordinator’s pubkey.
Expired
Bundle’s expires_at is in the past.
ExpiryWindowInvariant
expires_at did not equal min(participants[*].tct.expires_at)
(RFC-AITP-0010 §6).
CoordinatorIssuerMismatch
At least one participant TCT had a different issuer from the
bundle’s coordinator.
AudienceMismatch
At least one participant TCT had audience ≠ the entry’s
declared aid (the bundle distributes participants’ OWN TCTs
back to them, so audience and entry.aid must match).
NotMember
Verifier’s AID is not present in participants[].
MissingField(&'static str)
Builder was missing a required field.
EmptyParticipants
Empty participants array — RFC-AITP-0010 §3 requires at least one entry.
Canonicalization(String)
JCS canonicalization failed.
TctVerification(TctError)
TCT verification of an embedded participant TCT failed.
Crypto(CryptoError)
Crypto error (e.g. malformed AID-derived key).
WireFormInvalid(String)
The wire form was structurally invalid before any cryptographic
check could run: the {"session_bundle": …} transport wrapper
carried a member besides session_bundle (the pre-erratum shape
where signature sat as a SIBLING of the wrapper), or the inner
body did not deserialize as a SessionTrustBundle.
RFC-AITP-0010 §3 fixes signature as a member of the signed body,
never a sibling of the wrapper, precisely because a bundle is
redistributable and must carry its own proof across any hop that
strips the transport wrapper (RFC-AITP-0001 §5.4.1). Maps to
SESSION_BUNDLE_INVALID.
Trait Implementations§
Source§impl Debug for SessionBundleError
impl Debug for SessionBundleError
Source§impl Display for SessionBundleError
impl Display for SessionBundleError
Source§impl Error for SessionBundleError
impl Error for SessionBundleError
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()