Skip to main content

Basic

Struct Basic 

Source
pub struct Basic<'a, 'certificate> {
    pub target: &'a str,
    pub signed_properties_id: &'a str,
    pub signing_time: &'a str,
    pub certificate: &'a Certificate<'certificate>,
    pub certificate_digest_method: &'a str,
    pub certificate_digest: &'a [u8],
    pub objects: &'a [DataObject<'a>],
    pub counter_signature: Option<&'a str>,
}
Expand description

Minimal interoperable B-B property construction. Optional policy, role, commitment and object timestamps remain composable in the XML draft, and are checked by the existing complete preparation/field/level pipeline.

The signing certificate is actual parsed DER. certificate_digest is the selected provider’s digest of its COMPLETE bytes, not SPKI or signed bytes. This input is not a certificate/digest binding receipt; existing certificate checks must independently bind the final signed properties to the selected key.

Fields§

§target: &'a str

URI targeting this Signature by its unique bare-name fragment.

§signed_properties_id: &'a str

ID assigned to the new SignedProperties element.

§signing_time: &'a str

Claimed UTC XML Schema dateTime, validated by the XML writer.

§certificate: &'a Certificate<'certificate>

Actual whole signing certificate.

§certificate_digest_method: &'a str

XML digest-method URI selected by the native provider.

§certificate_digest: &'a [u8]

Complete certificate digest computed by that provider.

§objects: &'a [DataObject<'a>]

Signed data objects excluding SignedProperties and the counter target.

§counter_signature: Option<&'a str>

Actual parent SignatureValue URI for a baseline countersignature.

Implementations§

Source§

impl Basic<'_, '_>

Source

pub fn write<'a, B: Writer, W: Work>( &'a self, writer: &mut B, work: &W, ) -> Result<BasicReferences<'a>, Error<B::Error>>

Emit QualifyingProperties inside the owner’s one new ds:Object. The owner must include certificate in KeyInfo/X509Data and install the returned SignedInfo instructions before XMLDSig signing.

EN319132-1 §§4.4.2/5.2.2/5.2.7.2/6.3(a,h–l): direct incorporation, SigningTime, SigningCertificateV2 without Cert URI/issuer hint, and one DataObjectFormat per ordinary object. A pure countersignature has none. https://www.etsi.org/deliver/etsi_en/319100_319199/31913201/01.03.01_60/en_31913201v010301p.pdf

Source

pub fn write_key_info<B: Writer, W: Work>( &self, writer: &mut B, work: &W, ) -> Result<(), Error<B::Error>>

Emit the mandatory original signing certificate in one X509Data, inside a new KeyInfo. No path discovery, key matching or trust is implied.

Auto Trait Implementations§

§

impl<'a, 'certificate> !RefUnwindSafe for Basic<'a, 'certificate>

§

impl<'a, 'certificate> !Send for Basic<'a, 'certificate>

§

impl<'a, 'certificate> !Sync for Basic<'a, 'certificate>

§

impl<'a, 'certificate> !UnwindSafe for Basic<'a, 'certificate>

§

impl<'a, 'certificate> Forget for Basic<'a, 'certificate>

§

impl<'a, 'certificate> Freeze for Basic<'a, 'certificate>

§

impl<'a, 'certificate> Unpin for Basic<'a, 'certificate>

§

impl<'a, 'certificate> UnsafeUnpin for Basic<'a, 'certificate>

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.