Skip to main content

Container

Struct Container 

Source
pub struct Container<'a, 's, D, G> { /* private fields */ }
Expand description

One original signature’s decoded Contents, including the padding required by VRI naming. This owner keeps the producing PDF Session and signature membership; it cannot be constructed from replacement caller CMS bytes.

Implementations§

Source§

impl<'a, 's, D: Copy + Eq, G: Copy + Eq> Container<'a, 's, D, G>

Source

pub fn signature(&self) -> Signature<'a, 's, D, G>

The exact original dictionary whose Contents this owner decoded.

Source

pub fn contents(&self) -> &[u8] ⓘ

Whole decoded Contents for VRI naming, including every padding octet.

Source

pub fn der(&self) -> &[u8] ⓘ

One exact DER ContentInfo extent, excluding checked zero padding.

Source

pub fn read_timestamp<'q, W: Work + 'q>( &'q self, operation: &W, ) -> Result<(Token<'q>, Reader<'q>), ErrorOf<Infallible>>

Opens the original RFC3161 envelope without manufacturing another CMS input or dropping the PDF producing session’s depth/work boundary.

Source

pub fn read<'q, W: Work + 'q>( &'q self, operation: &W, ) -> Result<(SignedData<'q>, Reader<'q>), ErrorOf<Infallible>>

Opens the same carried document under a current operation. Root ASN.1 depth is zero because a PDF string is not an ASN.1 enclosing element.

Source§

impl<D: Copy + Eq, G: Copy + Eq> Container<'_, '_, D, G>

Source

pub fn vri_name<'p, P: AsnDigest<'p>, W: Work>( &self, provider: &'p P, operation: &W, ) -> Result<Option<Name>, NameError<P::Error>>

EN319142-1 §5.4.2.2(a) hashes all decoded Contents bytes, INCLUDING its unused padding, not just the parsed DER extent. SHA-1 here identifies a VRI dictionary; it does not grant a signature-algorithm permission. https://www.etsi.org/deliver/etsi_EN/319100_319199/31914201/01.02.01_60/en_31914201v010201p.pdf

Auto Trait Implementations§

§

impl<'a, 's, D, G> !Freeze for Container<'a, 's, D, G>

§

impl<'a, 's, D, G> !RefUnwindSafe for Container<'a, 's, D, G>

§

impl<'a, 's, D, G> !Send for Container<'a, 's, D, G>

§

impl<'a, 's, D, G> !Sync for Container<'a, 's, D, G>

§

impl<'a, 's, D, G> !UnwindSafe for Container<'a, 's, D, G>

§

impl<'a, 's, D, G> Forget for Container<'a, 's, D, G>

§

impl<'a, 's, D, G> Unpin for Container<'a, 's, D, G>
where Signature<'a, 's, D, G>: Unpin,

§

impl<'a, 's, D, G> UnsafeUnpin for Container<'a, 's, D, G>
where Signature<'a, 's, D, G>: UnsafeUnpin,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.