pub enum SessionBundleError {
Show 16 variants
VersionMismatch,
InvalidSignature,
Expired,
ExpiryWindowInvariant,
CoordinatorIssuerMismatch,
AudienceMismatch,
CoordinatorManifest(ManifestError),
CoordinatorManifestMismatch,
NotMember,
MissingField(&'static str),
EmptyParticipants,
Canonicalization(String),
TctVerification(TctError),
Crypto(CryptoError),
WireFormInvalid(String),
UnknownField(String),
}Expand description
Errors from session-bundle construction and verification.
Variants§
VersionMismatch
version field was not "aitp/0.3".
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).
CoordinatorManifest(ManifestError)
The coordinator’s Manifest failed RFC-AITP-0003 §5 verification (RFC-AITP-0010 §5 step 5).
CoordinatorManifestMismatch
The supplied coordinator Manifest’s aid is not the bundle’s
coordinator (RFC-AITP-0010 §5 step 5).
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.
UnknownField(String)
A member outside the schema-declared member set was found on a
closed object — the wrapper’s shape was fine, but the object
itself (the inner session_bundle body, or a nested closed
object such as a participants[] entry) carries a field the
schema does not define and which is not inside extensions.
Distinct from SessionBundleError::WireFormInvalid: that
variant is for the wrapper-level defect where signature sits
beside {"session_bundle": …} instead of inside it
(RFC-AITP-0010 §3). This variant is the RFC-AITP-0001 §7 /
RFC-AITP-0010 §5 body-level check — checked ahead of any
cryptographic work, including the coordinator key resolution used
to verify the outer signature — and maps to the core
UNKNOWN_FIELD code rather than a BUNDLE_* draft code, even
though the session bundle artifact itself is draft.
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()