Skip to main content

BundleBuilder

Struct BundleBuilder 

Source
pub struct BundleBuilder {
    pub manifest: Manifest,
    /* private fields */
}
Expand description

Builder for constructing ahu bundles.

Fields§

§manifest: Manifest

Implementations§

Source§

impl BundleBuilder

Source

pub fn new(manifest: Manifest) -> Self

Source

pub fn add_entry(&mut self, entry_key: [u8; 32], response_der: Vec<u8>)

Add an entry. certid_der is the DER encoding of the CertID; response_der is the complete DER-encoded OCSPResponse.

Source

pub fn add_entry_with_discriminator( &mut self, entry_key: [u8; 32], discriminator: u16, response_der: Vec<u8>, )

Source

pub fn add_dual_entry( &mut self, entry_key_1: [u8; 32], entry_key_2: [u8; 32], response_der: Vec<u8>, )

Add a dual-CertID entry: one response payload indexed under two keys.

Both records carry the full payload so that sorting doesn’t break the pairing. During build, we deduplicate by data content so the payload is stored only once in the data section.

Source

pub fn add_dual_entry_with_discriminator( &mut self, entry_key_1: [u8; 32], entry_key_2: [u8; 32], response_der: Vec<u8>, discriminator: u16, )

Source

pub fn add_tombstone(&mut self, entry_key: [u8; 32], discriminator: u16)

Add a tombstone (delta only). The discriminator must match the target record’s discriminator to suppress the correct algorithm variant.

Source

pub fn build<F>(self, seal_fn: F) -> Result<Vec<u8>>
where F: FnOnce(&[u8]) -> Result<Vec<u8>>,

Build the bundle. seal_fn is called with the manifest bytes and must return a CMS SignedData (detached) as DER bytes.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,