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: boolEffective permitUnSpecified, including its normative default.
Implementations§
Source§impl<'a> AaControls<'a>
impl<'a> AaControls<'a>
Sourcepub fn read(parent: &mut ScopedReader<'a, '_>) -> Result<Self>
pub fn read(parent: &mut ScopedReader<'a, '_>) -> Result<Self>
Reads a complete original DER value with inherited source/current limits.
Sourcepub fn read_element(
parent: &ScopedReader<'a, '_>,
element: &Element<'a>,
) -> Result<Self>
pub fn read_element( parent: &ScopedReader<'a, '_>, element: &Element<'a>, ) -> Result<Self>
Reads one original whole element, without a replacement Parser.
Sourcepub fn read_extension<W: Work>(
extension: &Extension<'a>,
work: &W,
) -> Result<Self>
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.
Sourcepub fn allows<W: Work>(&self, kind: Oid<'_>, work: &W) -> Result<bool>
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.
Sourcepub fn permits_distance<W: Work>(&self, distance: u64, work: &W) -> Result<bool>
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.