assertDerMaxDepth
assertDerMaxDepth
Walks the full DER tree rooted in bytes.
Constructed tags with content that cannot be parsed as valid children are tolerated when listed in allowOpaqueConstructedTags.
ts
function assertDerMaxDepth(
bytes: Uint8Array,
maxDepth: number,
options?: {
readonly allowOpaqueConstructedTags?: readonly number[]
},
): voidParameters
bytes:Uint8ArraymaxDepth:numberoptions?: {readonlyallowOpaqueConstructedTags?:readonlynumber``[]}
Throws
- if nesting exceeds
maxDepth.