Skip to main content

AaControls

Struct AaControls 

Source
pub struct AaControls<'a> {
    pub element: Element<'a>,
    pub path_length: Option<Integer<'a>>,
    pub path_length_element: Option<Element<'a>>,
    pub permitted_element: Option<Element<'a>>,
    pub permitted: OwnedVec<Oid<'a>>,
    pub excluded_element: Option<Element<'a>>,
    pub excluded: OwnedVec<Oid<'a>>,
    pub unspecified_element: Option<Element<'a>>,
    pub permit_unspecified: bool,
    /* private fields */
}
Expand description

Complete original AAControls. Absence and an explicitly empty AttrSpec are preserved; neither grants an attribute independently of other path controls.

Fields§

§element: Element<'a>

Original whole value SEQUENCE.

§path_length: Option<Integer<'a>>

Original unbounded nonnegative path constraint; never truncated.

§path_length_element: Option<Element<'a>>

Original pathLenConstraint encoding.

§permitted_element: Option<Element<'a>>

Original [0] IMPLICIT AttrSpec, absent independently of its contents.

§permitted: OwnedVec<Oid<'a>>

Original permitted identifiers in sequence order, without deduplication.

§excluded_element: Option<Element<'a>>

Original [1] IMPLICIT AttrSpec.

§excluded: OwnedVec<Oid<'a>>

Original excluded identifiers, which override permitted entries.

§unspecified_element: Option<Element<'a>>

Original BOOLEAN, absent for the schema default TRUE.

§permit_unspecified: bool

Effective permitUnSpecified, including its normative default.

Implementations§

Source§

impl<'a> AaControls<'a>

Source

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

Reads a complete original DER value with inherited source/current limits.

Source

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

Reads one original whole element, without a replacement Parser.

Source

pub fn read_extension<W: Work>( extension: &Extension<'a>, work: &W, ) -> Result<Self>

Reads a registered PKC extension. Criticality MAY be TRUE (§7.4), so either value is accepted; no PKC or trust assertion is fabricated.

Source

pub fn allows<W: Work>(&self, kind: Oid<'_>, work: &W) -> Result<bool>

This extension’s attribute restriction only. Exclusions win even when an OID also appears in permittedAttrs. Apply the intersection of all required trusted-path controls; this predicate proves no path or trust.

Source

pub fn permits_distance<W: Work>(&self, distance: u64, work: &W) -> Result<bool>

Compares a caller’s already-established path distance to this one bound. RFC5280 path-length counting and selecting the AA CA remain caller work. Wide positive constraints exceed every u64 distance rather than wrapping.

Trait Implementations§

Source§

impl<'a> Debug for AaControls<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for AaControls<'a>

§

impl<'a> !RefUnwindSafe for AaControls<'a>

§

impl<'a> !Send for AaControls<'a>

§

impl<'a> !Sync for AaControls<'a>

§

impl<'a> !UnwindSafe for AaControls<'a>

§

impl<'a> Unpin for AaControls<'a>

§

impl<'a> UnsafeUnpin for AaControls<'a>

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.