pub struct BundleV03 {
pub verification: VerificationMaterialV03,
pub content: SignatureContent,
pub tlog_entries: Vec<TransparencyLogEntry>,
pub rfc3161_timestamps: Vec<Rfc3161Timestamp>,
}Expand description
A Sigstore bundle in v0.3 format.
The v0.3 format requires:
- A single certificate (not a chain) or public key hint
- Either a message signature or DSSE envelope
- Optional transparency log entries and RFC 3161 timestamps
§Example
ⓘ
use sigstore_bundle::BundleV03;
let bundle = BundleV03::with_certificate_and_signature(cert_der, signature, artifact_hash)
.with_tlog_entry(tlog_entry)
.into_bundle();Fields§
§verification: VerificationMaterialV03Verification material - either a certificate or public key
content: SignatureContentThe signature content (message signature or DSSE envelope)
tlog_entries: Vec<TransparencyLogEntry>Transparency log entries
rfc3161_timestamps: Vec<Rfc3161Timestamp>RFC 3161 timestamps
Implementations§
Source§impl BundleV03
impl BundleV03
Sourcepub fn new(
verification: VerificationMaterialV03,
content: SignatureContent,
) -> Self
pub fn new( verification: VerificationMaterialV03, content: SignatureContent, ) -> Self
Create a new v0.3 bundle with the required fields.
Sourcepub fn with_certificate_and_signature(
certificate: DerCertificate,
signature: SignatureBytes,
artifact_digest: Sha256Hash,
) -> Self
pub fn with_certificate_and_signature( certificate: DerCertificate, signature: SignatureBytes, artifact_digest: Sha256Hash, ) -> Self
Create a new v0.3 bundle with a certificate and message signature.
This is the most common case for Sigstore signing with Fulcio certificates.
Sourcepub fn with_certificate_and_dsse(
certificate: DerCertificate,
envelope: DsseEnvelope,
) -> Self
pub fn with_certificate_and_dsse( certificate: DerCertificate, envelope: DsseEnvelope, ) -> Self
Create a new v0.3 bundle with a certificate and DSSE envelope.
Used for attestations (in-toto statements).
Sourcepub fn with_tlog_entry(self, entry: TransparencyLogEntry) -> Self
pub fn with_tlog_entry(self, entry: TransparencyLogEntry) -> Self
Add a transparency log entry.
Sourcepub fn with_rfc3161_timestamp(self, timestamp: TimestampToken) -> Self
pub fn with_rfc3161_timestamp(self, timestamp: TimestampToken) -> Self
Add an RFC 3161 timestamp.
Sourcepub fn into_bundle(self) -> Bundle
pub fn into_bundle(self) -> Bundle
Convert to a serializable Bundle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BundleV03
impl RefUnwindSafe for BundleV03
impl Send for BundleV03
impl Sync for BundleV03
impl Unpin for BundleV03
impl UnwindSafe for BundleV03
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more