Skip to main content

AttributeCertificate

Struct AttributeCertificate 

Source
pub struct AttributeCertificate<'a> { /* private fields */ }
Expand description

A v2 attribute certificate’s structure and exact original signature inputs.

Implementations§

Source§

impl<'a> AttributeCertificate<'a>

Source

pub fn authenticate<'r, 's, V, W: Work>( &'r self, authority: &'r Certificate<'s>, key: WorkingKey<'s>, interval: Interval, verifier: &V, work: &W, ) -> Result<Outcome<Authenticated<'r, 'a, 's>>, AuthenticationError<<V as AlgorithmAgreement>::Error>>
where for<'op> V: AlgorithmAgreement + Verify<Execution<'op>, Error = <V as AlgorithmAgreement>::Error>,

Authenticate the selected authority/key and complete evaluation interval.

All static profile, authority, key, time and signature-padding gates run before provider resolution or signature math. The selected verifier also implements the existing PKIX signature contract for scoped execution. It must account backend work/storage and use original key/signature readers for deferred decoding; passing Work does not qualify a backend. No PKIX path or direct AA trust is inferred from successful arithmetic.

Source§

impl<'a> AttributeCertificate<'a>

Source

pub fn bind_holder_digest<'r, 's, 'p, P: ObjectDigestProvider<'p>, W: Work>( &'r self, object: Object<'r, 's>, provider: &'p P, work: &W, ) -> Result<Binding<'r, 'a, 's>, BindingError<P::Error>>

Bind the written objectDigestInfo to one explicit object with one provider.

Profile/object/algorithm/width gates precede hash state creation. The public-key branch checks representation with the selected provider before hashing canonical effective SPKI chunks. Certificate hashing includes its signature. Every input callback receives its own source/current execution; comparison receives the assertion’s execution. States/output are consumed once and dropped on any failure; no successful partial fact escapes.

Source§

impl<'a> AttributeCertificate<'a>

Source

pub fn profile<W: Work>(&self, work: &W) -> Result<Check<Profile<'_, 'a>>>

Check static profile rules and decode all recognized extension values.

All fields remain inspectable through information() on refusal. The accepted facts retain targeting/proxy obligations; they are not evidence that those effects, signatures, trust, time or revocation were checked.

Source

pub fn bind_holder<W: Work>( &self, certificate: &Certificate<'_>, method: HolderMethod, work: &W, ) -> Result<Check<()>>

Bind one explicitly chosen Holder method to a supplied authenticated PKC.

This checks identity only: it does not authenticate the PKC or select which Holder method the surrounding protocol trusts. Optional objectDigestInfo is not silently treated as an entityName or a base ID. RFC5755 §4.2.2: https://www.rfc-editor.org/rfc/rfc5755#section-4.2.2

Source

pub fn bind_authority<W: Work>( &self, authority: &Certificate<'_>, work: &W, ) -> Result<Check<()>>

Bind issuer DN/UID and check the authority PKC’s AA-specific purpose.

RFC5755 §§4.2.3/4.2.8/4.5 require a non-CA authority permitted to sign data (digitalSignature or contentCommitment). The AC issuerUID identifies that authority itself, hence compares with its subjectUniqueID, whereas Holder.baseCertificateID.issuerUID identifies the holder PKC’s issuer. The original authority’s path, effective key, algorithm agreement and AC signature still need checking. https://www.rfc-editor.org/rfc/rfc5755#section-4.2.8

Source§

impl<'a> AttributeCertificate<'a>

Source

pub fn read(parent: &mut Reader<'a>) -> Result<Self>

Reads a standalone universal SEQUENCE, with no trailing document bytes. The producing reader selects BER or DER; signing requires the original DER acinfo, which this entry checks regardless of the outer encoding.

Source

pub fn read_element(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>

Reads one original universal SEQUENCE in its producing context.

Source

pub fn read_implicit(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>

Reads CMS’s [2] IMPLICIT AttributeCertificateV2, without retagging. Supply the original certificate-set member context, for example from crate::SignedData::certificate_choice_reader_in.

Source

pub fn information(&self) -> &Information<'a>

Parsed signed fields. Their readability is not a profile/trust verdict.

Source

pub fn target_information<W: Work>( &self, work: &W, ) -> Result<Option<TargetInformation<'a>>>

Decodes the optional original recipient-targeting extension under the current operation. None means no targeting restriction (RFC5755 §4.3.2); a present empty set is returned as such and matches no recipient. Readability alone does not authenticate the AC or its asserted targets.

Source

pub fn signed_bytes(&self) -> &'a [u8] ⓘ

Exact whole original acinfo TLV, not a re-encoding of the parsed fields.

Source

pub fn signed_element(&self) -> Element<'a>

Original source range of the signed information.

Source

pub fn signature_algorithm(&self) -> AlgorithmIdentifier<'a>

Outer algorithm, to be checked against the signed algorithm by the provider.

Source

pub fn signature_value(&self) -> SignatureValue<'a>

Original signature bits and deferred payload context.

Source

pub fn element(&self) -> Element<'a>

Entire original certificate, retaining an IMPLICIT tag when present.

Trait Implementations§

Source§

impl<'a> Debug for AttributeCertificate<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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, 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.