Skip to content

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[]
},
): void

Parameters

  • bytes: Uint8Array
  • maxDepth: number
  • options?: { readonly allowOpaqueConstructedTags?: readonly number``[] }

Throws

Released under the MIT License.