import type EqualityMatcher from "../types/EqualityMatcher.mjs"; import type { OBJECT_IDENTIFIER } from "@wildboar/asn1"; import type { DistinguishedName } from "../modules/InformationFramework/DistinguishedName.ta.mjs"; import type { SubtreeSpecification } from "../modules/InformationFramework/SubtreeSpecification.ta.mjs"; import type { OBJECT_CLASS } from "../modules/InformationFramework/OBJECT-CLASS.oca.mjs"; /** * @summary Determine whether a distinguished name falls within a subtree. * @description * * Determines whether a distinguished name falls within a subtree defined by a * `SubtreeSpecification`. * * ### Relevant ASN.1 Definitions * * ```asn1 * SubtreeSpecification ::= SEQUENCE { * base [0] LocalName DEFAULT {}, * COMPONENTS OF ChopSpecification, * specificationFilter [4] Refinement OPTIONAL, * ... } * -- empty sequence specifies whole administrative area * * LocalName ::= RDNSequence * * ChopSpecification ::= SEQUENCE { * specificExclusions [1] SET SIZE (1..MAX) OF CHOICE { * chopBefore [0] LocalName, * chopAfter [1] LocalName, * ...} OPTIONAL, * minimum [2] BaseDistance DEFAULT 0, * maximum [3] BaseDistance OPTIONAL, * ... } * * BaseDistance ::= INTEGER(0..MAX) * * Refinement ::= CHOICE { * item [0] OBJECT-CLASS.&id, * and [1] SET SIZE (1..MAX) OF Refinement, * or [2] SET SIZE (1..MAX) OF Refinement, * not [3] Refinement, * ... } * ``` * * @param {DistinguishedName} entryDN The full distinguished name of the entry. * @param {OBJECT_IDENTIFIER[]} entryObjectClasses The entry's object classes * @param {SubtreeSpecification} sts The subtree specification used to * subcategorize the administrative area. * @param {DistinguishedName} scope The vertex that forms the root to which the * subtree specification is applied. * @param {Function} getEqualityMatcher A function that takes an object * identifier that identifies a type and returns an equality matcher. * @returns {boolean | undefined} A boolean, which will be `true` if the entry * falls within the subtree specification. `undefined` if a chop exclusion * choice variant is not understood. * @function */ export declare function dnWithinSubtreeSpecification(entryDN: DistinguishedName, entryObjectClasses: OBJECT_CLASS["&id"][], sts: SubtreeSpecification, scope: DistinguishedName, getEqualityMatcher?: (attributeType: OBJECT_IDENTIFIER) => EqualityMatcher | undefined): boolean | undefined; export default dnWithinSubtreeSpecification; //# sourceMappingURL=dnWithinSubtreeSpecification.d.mts.map