pub struct TrustBundle {
pub format_version: u8,
pub version: u32,
pub bundle_id: String,
pub created_at: u64,
pub validity: ValidityPeriod,
pub certificate_authorities: Vec<CertificateAuthority>,
pub transparency_logs: Vec<TransparencyLog>,
pub revocations: Vec<String>,
}Expand description
Trust bundle containing all trust anchors for offline verification
This structure contains:
- Fulcio root certificates (to anchor certificate chains)
- Rekor public keys (to verify Signed Entry Timestamps)
- Revocation list (certificate fingerprints to reject)
- Validity period with grace period support
The bundle is versioned for anti-rollback protection - devices reject bundles with a version lower than their stored version.
Fields§
§format_version: u8Format version for forward compatibility
version: u32Monotonically increasing bundle version (anti-rollback)
Devices must reject bundles with version < stored_version.
Increment this on every bundle update.
bundle_id: StringUnique bundle identifier (SHA-256 of canonical form, hex-encoded)
created_at: u64When this bundle was created (Unix timestamp)
validity: ValidityPeriodBundle validity period
Fulcio certificate authorities
Contains root and intermediate certificates used to anchor the certificate chains in keyless signatures.
transparency_logs: Vec<TransparencyLog>Rekor transparency log configurations
Contains public keys for verifying Signed Entry Timestamps.
revocations: Vec<String>Revoked certificate fingerprints
SHA-256 hashes of DER-encoded leaf certificates that should be rejected even if otherwise valid. Hex-encoded.
Implementations§
Source§impl TrustBundle
impl TrustBundle
Add a certificate authority
Sourcepub fn add_transparency_log(&mut self, log: TransparencyLog)
pub fn add_transparency_log(&mut self, log: TransparencyLog)
Add a transparency log
Sourcepub fn add_revocation(&mut self, fingerprint: String)
pub fn add_revocation(&mut self, fingerprint: String)
Add a revoked certificate fingerprint
Sourcepub fn is_in_grace_period(&self, current_time: u64) -> bool
pub fn is_in_grace_period(&self, current_time: u64) -> bool
Check if the bundle is in grace period
Sourcepub fn is_revoked(&self, fingerprint: &str) -> bool
pub fn is_revoked(&self, fingerprint: &str) -> bool
Check if a certificate fingerprint is revoked
Sourcepub fn compute_bundle_id(&mut self) -> Result<(), WSError>
pub fn compute_bundle_id(&mut self) -> Result<(), WSError>
Compute bundle ID (SHA-256 of canonical JSON)
Trait Implementations§
Source§impl Clone for TrustBundle
impl Clone for TrustBundle
Source§fn clone(&self) -> TrustBundle
fn clone(&self) -> TrustBundle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more