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>
impl<'a, 's, D: Copy + Eq, G: Copy + Eq> Container<'a, 's, D, G>
Sourcepub fn signature(&self) -> Signature<'a, 's, D, G>
pub fn signature(&self) -> Signature<'a, 's, D, G>
The exact original dictionary whose Contents this owner decoded.
Sourcepub fn contents(&self) -> &[u8] ⓘ
pub fn contents(&self) -> &[u8] ⓘ
Whole decoded Contents for VRI naming, including every padding octet.
Sourcepub fn read_timestamp<'q, W: Work + 'q>(
&'q self,
operation: &W,
) -> Result<(Token<'q>, Reader<'q>), ErrorOf<Infallible>>
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.
Sourcepub fn read<'q, W: Work + 'q>(
&'q self,
operation: &W,
) -> Result<(SignedData<'q>, Reader<'q>), ErrorOf<Infallible>>
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>
impl<D: Copy + Eq, G: Copy + Eq> Container<'_, '_, D, G>
Sourcepub fn vri_name<'p, P: AsnDigest<'p>, W: Work>(
&self,
provider: &'p P,
operation: &W,
) -> Result<Option<Name>, NameError<P::Error>>
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