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>
impl<'a> AttributeCertificate<'a>
Sourcepub 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>,
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>
impl<'a> AttributeCertificate<'a>
Sourcepub 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>>
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>
impl<'a> AttributeCertificate<'a>
Sourcepub fn profile<W: Work>(&self, work: &W) -> Result<Check<Profile<'_, 'a>>>
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.
Sourcepub fn bind_holder<W: Work>(
&self,
certificate: &Certificate<'_>,
method: HolderMethod,
work: &W,
) -> Result<Check<()>>
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
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>
impl<'a> AttributeCertificate<'a>
Sourcepub fn read(parent: &mut Reader<'a>) -> Result<Self>
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.
Sourcepub fn read_element(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
pub fn read_element(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
Reads one original universal SEQUENCE in its producing context.
Sourcepub fn read_implicit(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
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.
Sourcepub fn information(&self) -> &Information<'a>
pub fn information(&self) -> &Information<'a>
Parsed signed fields. Their readability is not a profile/trust verdict.
Sourcepub fn target_information<W: Work>(
&self,
work: &W,
) -> Result<Option<TargetInformation<'a>>>
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.
Sourcepub fn signed_bytes(&self) -> &'a [u8] ⓘ
pub fn signed_bytes(&self) -> &'a [u8] ⓘ
Exact whole original acinfo TLV, not a re-encoding of the parsed fields.
Sourcepub fn signed_element(&self) -> Element<'a>
pub fn signed_element(&self) -> Element<'a>
Original source range of the signed information.
Sourcepub fn signature_algorithm(&self) -> AlgorithmIdentifier<'a>
pub fn signature_algorithm(&self) -> AlgorithmIdentifier<'a>
Outer algorithm, to be checked against the signed algorithm by the provider.
Sourcepub fn signature_value(&self) -> SignatureValue<'a>
pub fn signature_value(&self) -> SignatureValue<'a>
Original signature bits and deferred payload context.