From 805161300fbeb7d3508b1520d25adbcfe620abf6 Mon Sep 17 00:00:00 2001 From: farhadh Date: Thu, 9 Feb 2023 13:28:19 +0100 Subject: [PATCH] Added support for specifying class of the types. --- lib/asn1/base/node.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/asn1/base/node.js b/lib/asn1/base/node.js index d676d21..0849631 100644 --- a/lib/asn1/base/node.js +++ b/lib/asn1/base/node.js @@ -218,6 +218,14 @@ Node.prototype.implicit = function implicit(num) { return this; }; +Node.prototype.cls = function cls(cls) { + const state = this._baseState; + + state.cls = cls; + + return this; +}; + Node.prototype.obj = function obj() { const state = this._baseState; const args = Array.prototype.slice.call(arguments);