Comparing version 7.0.15 to 7.0.16
@@ -596,7 +596,7 @@ "use strict"; | ||
for (const substring of substrings) { | ||
if (substring.tagClass !== this.tagClass) { | ||
throw new errors.ASN1ConstructionError(`Invalid tag class in recursively-encoded ${dataType}.`, this); | ||
if (substring.tagClass !== values_1.ASN1TagClass.universal) { | ||
throw new errors.ASN1ConstructionError(`Invalid tag class in constructed ${dataType}. Must be UNIVERSAL`, this); | ||
} | ||
if (substring.tagNumber !== this.tagNumber) { | ||
throw new errors.ASN1ConstructionError(`Invalid tag class in recursively-encoded ${dataType}.`, this); | ||
if (substring.tagNumber !== values_1.ASN1UniversalType.octetString) { | ||
throw new errors.ASN1ConstructionError(`Invalid tag number in constructed ${dataType}. Must be 4 (OCTET STRING).`, this); | ||
} | ||
@@ -603,0 +603,0 @@ substring.recursionCount = (this.recursionCount + 1); |
@@ -60,3 +60,3 @@ "use strict"; | ||
.from((0, splitOctetsCanonically_1.default)(value)) | ||
.map((fragment) => new CERElement(this.tagClass, values_1.ASN1Construction.primitive, this.tagNumber, new Uint8Array(fragment)))); | ||
.map((fragment) => new CERElement(values_1.ASN1TagClass.universal, values_1.ASN1Construction.primitive, values_1.ASN1UniversalType.octetString, new Uint8Array(fragment)))); | ||
} | ||
@@ -613,7 +613,7 @@ } | ||
for (const substring of substrings) { | ||
if (substring.tagClass !== this.tagClass) { | ||
throw new errors.ASN1ConstructionError(`Invalid tag class in recursively-encoded ${dataType}.`, this); | ||
if (substring.tagClass !== values_1.ASN1TagClass.universal) { | ||
throw new errors.ASN1ConstructionError(`Invalid tag class in constructed ${dataType}. Must be UNIVERSAL`, this); | ||
} | ||
if (substring.tagNumber !== this.tagNumber) { | ||
throw new errors.ASN1ConstructionError(`Invalid tag class in recursively-encoded ${dataType}.`, this); | ||
if (substring.tagNumber !== values_1.ASN1UniversalType.octetString) { | ||
throw new errors.ASN1ConstructionError(`Invalid tag number in constructed ${dataType}. Must be 4 (OCTET STRING).`, this); | ||
} | ||
@@ -620,0 +620,0 @@ substring.recursionCount = (this.recursionCount + 1); |
@@ -64,3 +64,3 @@ { | ||
"types": "./dist/node/index.d.ts", | ||
"version": "7.0.15" | ||
"version": "7.0.16" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
693857