@peculiar/certificates-viewer 3.2.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{certification_request-cde57123.js → certification_request-e1997ebf.js} +563 -133
- package/dist/cjs/crl-f1ee43bc.js +312 -0
- package/dist/cjs/{index-ff818d4d.js → download-a97f4cb2.js} +106 -2
- package/dist/cjs/index.cjs.js +1 -3
- package/dist/cjs/l10n-638a7577.js +167 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{peculiar-attribute-certificate-viewer_2.cjs.entry.js → peculiar-attribute-certificate-viewer_3.cjs.entry.js} +123 -21
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -15
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +2 -2
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +6 -25
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +6 -8
- package/dist/cjs/peculiar.cjs.js +1 -1
- package/dist/cjs/{public_key-2f5bd471.js → public_key-ba538d77.js} +80 -40
- package/dist/cjs/{x509_certificate-51a97033.js → x509_certificate-42b478d2.js} +13 -7
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +19 -6
- package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +2 -1
- package/dist/collection/components/certificate-viewer/basic_information.js +3 -1
- package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +2 -1
- package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +2 -1
- package/dist/collection/components/certificate-viewer/extensions/crl_number_extension.js +19 -0
- package/dist/collection/components/certificate-viewer/extensions/index.js +9 -1
- package/dist/collection/components/certificate-viewer/extensions/issuing_distribution_point_extension.js +27 -0
- package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +2 -1
- package/dist/collection/components/certificate-viewer/miscellaneous.js +2 -20
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +2 -3
- package/dist/collection/components/crl-viewer/crl-viewer.js +234 -0
- package/dist/collection/components/crl-viewer/revoked_certificates.js +27 -0
- package/dist/collection/crypto/crl.js +82 -0
- package/dist/collection/crypto/csr.js +7 -0
- package/dist/collection/crypto/extension.js +10 -1
- package/dist/collection/crypto/index.js +1 -0
- package/dist/collection/crypto/x509_attribute_certificate.js +7 -1
- package/dist/collection/crypto/x509_certificate.js +7 -1
- package/dist/collection/locales/en.json +12 -1
- package/dist/collection/utils/download.js +18 -2
- package/dist/collection/utils/index.js +1 -0
- package/dist/collection/utils/validator.js +2 -0
- package/dist/esm/{certification_request-c0674647.js → certification_request-5d982d92.js} +493 -66
- package/dist/esm/crl-f2110716.js +308 -0
- package/dist/esm/{index-0ba131b0.js → download-67ac9120.js} +102 -2
- package/dist/esm/index.js +1 -3
- package/dist/esm/{l10n-ac28fa92.js → l10n-da0dd100.js} +24 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{peculiar-attribute-certificate-viewer_2.entry.js → peculiar-attribute-certificate-viewer_3.entry.js} +113 -12
- package/dist/esm/peculiar-certificate-decoder.entry.js +21 -11
- package/dist/esm/peculiar-certificate-summary_3.entry.js +2 -2
- package/dist/esm/peculiar-certificate-viewer.entry.js +6 -25
- package/dist/esm/peculiar-certificates-viewer.entry.js +6 -8
- package/dist/esm/peculiar.js +1 -1
- package/dist/esm/{public_key-38c9ddc8.js → public_key-0a3091a5.js} +67 -28
- package/dist/esm/{x509_certificate-12f6d344.js → x509_certificate-6b243207.js} +9 -3
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/locales/en.json +12 -1
- package/dist/peculiar/p-34e2d6be.entry.js +11 -0
- package/dist/peculiar/p-35e7a514.js +12 -0
- package/dist/peculiar/p-3aea9dde.js +32 -0
- package/dist/peculiar/{p-38635919.entry.js → p-49ab6f8c.entry.js} +1 -1
- package/dist/peculiar/p-86116b1f.entry.js +4 -0
- package/dist/peculiar/{p-464e0943.js → p-bce2bbe0.js} +9 -9
- package/dist/peculiar/p-ca0c34ca.entry.js +26 -0
- package/dist/peculiar/p-cff9655c.js +18 -0
- package/dist/peculiar/{p-17c4da7b.js → p-db6e24c6.js} +2 -2
- package/dist/peculiar/p-e535a666.entry.js +4 -0
- package/dist/peculiar/p-f8dc3232.js +63 -0
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +3 -3
- package/dist/types/components/certificate-viewer/basic_information.d.ts +2 -0
- package/dist/types/components/certificate-viewer/extensions/crl_number_extension.d.ts +15 -0
- package/dist/types/components/certificate-viewer/extensions/issuing_distribution_point_extension.d.ts +15 -0
- package/dist/types/components/certificate-viewer/miscellaneous.d.ts +2 -2
- package/dist/types/components/certificate-viewer/row.d.ts +1 -1
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +59 -0
- package/dist/types/components/crl-viewer/revoked_certificates.d.ts +14 -0
- package/dist/types/components.d.ts +66 -0
- package/dist/types/crypto/crl.d.ts +28 -0
- package/dist/types/crypto/csr.d.ts +2 -0
- package/dist/types/crypto/extension.d.ts +2 -2
- package/dist/types/crypto/index.d.ts +1 -0
- package/dist/types/crypto/x509_attribute_certificate.d.ts +2 -0
- package/dist/types/crypto/x509_certificate.d.ts +2 -0
- package/dist/types/utils/download.d.ts +10 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/l10n.d.ts +11 -0
- package/dist/types/utils/validator.d.ts +1 -0
- package/package.json +19 -19
- package/dist/cjs/_commonjsHelpers-cb1f949a.js +0 -23
- package/dist/cjs/csr-78378ed0.js +0 -150
- package/dist/cjs/download-6724f3a7.js +0 -79
- package/dist/cjs/l10n-a048a686.js +0 -145
- package/dist/cjs/x509_attribute_certificate-cc325b70.js +0 -87
- package/dist/esm/_commonjsHelpers-bfbd2ad8.js +0 -20
- package/dist/esm/csr-c1b6a176.js +0 -147
- package/dist/esm/download-735fb2eb.js +0 -76
- package/dist/esm/x509_attribute_certificate-a6d4aa15.js +0 -85
- package/dist/peculiar/p-006865d7.js +0 -4
- package/dist/peculiar/p-3f8d1008.entry.js +0 -4
- package/dist/peculiar/p-42da7f97.js +0 -11
- package/dist/peculiar/p-4f4c1d30.js +0 -12
- package/dist/peculiar/p-6011646e.entry.js +0 -11
- package/dist/peculiar/p-6bfd077c.entry.js +0 -18
- package/dist/peculiar/p-6c510523.js +0 -18
- package/dist/peculiar/p-986cc770.entry.js +0 -11
- package/dist/peculiar/p-b765873e.js +0 -78
- package/dist/peculiar/p-d0b55fbb.js +0 -4
- package/dist/peculiar/p-d7a13cb4.js +0 -18
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { b as build } from './
|
|
5
|
-
import './l10n-
|
|
6
|
-
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-bfbd2ad8.js';
|
|
4
|
+
import { b as build, c as createCommonjsModule, a as commonjsGlobal } from './download-67ac9120.js';
|
|
5
|
+
import './l10n-da0dd100.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* @license
|
|
@@ -19,6 +18,8 @@ const isPem = (value) => (/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-
|
|
|
19
18
|
.test(value));
|
|
20
19
|
const isX509Pem = (value) => (/-----BEGIN CERTIFICATE-----([A-Za-z0-9+\/=\s]+)-----END CERTIFICATE-----/
|
|
21
20
|
.test(value));
|
|
21
|
+
const isX509CRLPem = (value) => (/-----BEGIN X509 CRL-----([A-Za-z0-9+\/=\s]+)-----END X509 CRL-----/
|
|
22
|
+
.test(value));
|
|
22
23
|
const isPkcs10Pem = (value) => (/-----BEGIN CERTIFICATE REQUEST-----([A-Za-z0-9+\/=\s]+)-----END CERTIFICATE REQUEST-----/
|
|
23
24
|
.test(value));
|
|
24
25
|
const isX509AttributePem = (value) => (/-----BEGIN ATTRIBUTE CERTIFICATE-----([A-Za-z0-9+\/=\s]+)-----END ATTRIBUTE CERTIFICATE-----/
|
|
@@ -3297,7 +3298,7 @@ function verifySchema(inputBuffer, inputSchema) {
|
|
|
3297
3298
|
return compareSchema(asn1.result, asn1.result, inputSchema);
|
|
3298
3299
|
}
|
|
3299
3300
|
|
|
3300
|
-
const
|
|
3301
|
+
const asn1js = /*#__PURE__*/Object.freeze({
|
|
3301
3302
|
__proto__: null,
|
|
3302
3303
|
Any: Any,
|
|
3303
3304
|
BaseBlock: BaseBlock,
|
|
@@ -3383,7 +3384,7 @@ var AsnPropTypes;
|
|
|
3383
3384
|
})(AsnPropTypes || (AsnPropTypes = {}));
|
|
3384
3385
|
|
|
3385
3386
|
const AsnAnyConverter = {
|
|
3386
|
-
fromASN: (value) => value instanceof Null ? null : value.
|
|
3387
|
+
fromASN: (value) => value instanceof Null ? null : value.valueBeforeDecodeView,
|
|
3387
3388
|
toASN: (value) => {
|
|
3388
3389
|
if (value === null) {
|
|
3389
3390
|
return new Null();
|
|
@@ -3396,21 +3397,21 @@ const AsnAnyConverter = {
|
|
|
3396
3397
|
},
|
|
3397
3398
|
};
|
|
3398
3399
|
const AsnIntegerConverter = {
|
|
3399
|
-
fromASN: (value) => value.valueBlock.
|
|
3400
|
+
fromASN: (value) => value.valueBlock.valueHexView.byteLength >= 4
|
|
3400
3401
|
? value.valueBlock.toString()
|
|
3401
3402
|
: value.valueBlock.valueDec,
|
|
3402
|
-
toASN: (value) => new Integer({ value: value }),
|
|
3403
|
+
toASN: (value) => new Integer({ value: +value }),
|
|
3403
3404
|
};
|
|
3404
3405
|
const AsnEnumeratedConverter = {
|
|
3405
3406
|
fromASN: (value) => value.valueBlock.valueDec,
|
|
3406
3407
|
toASN: (value) => new Enumerated({ value }),
|
|
3407
3408
|
};
|
|
3408
3409
|
const AsnIntegerArrayBufferConverter = {
|
|
3409
|
-
fromASN: (value) => value.valueBlock.
|
|
3410
|
+
fromASN: (value) => value.valueBlock.valueHexView,
|
|
3410
3411
|
toASN: (value) => new Integer({ valueHex: value }),
|
|
3411
3412
|
};
|
|
3412
3413
|
const AsnBitStringConverter = {
|
|
3413
|
-
fromASN: (value) => value.valueBlock.
|
|
3414
|
+
fromASN: (value) => value.valueBlock.valueHexView,
|
|
3414
3415
|
toASN: (value) => new BitString$1({ valueHex: value }),
|
|
3415
3416
|
};
|
|
3416
3417
|
const AsnObjectIdentifierConverter = {
|
|
@@ -3422,7 +3423,7 @@ const AsnBooleanConverter = {
|
|
|
3422
3423
|
toASN: (value) => new Boolean({ value }),
|
|
3423
3424
|
};
|
|
3424
3425
|
const AsnOctetStringConverter = {
|
|
3425
|
-
fromASN: (value) => value.valueBlock.
|
|
3426
|
+
fromASN: (value) => value.valueBlock.valueHexView,
|
|
3426
3427
|
toASN: (value) => new OctetString$1({ valueHex: value }),
|
|
3427
3428
|
};
|
|
3428
3429
|
function createStringConverter(Asn1Type) {
|
|
@@ -3452,8 +3453,8 @@ const AsnGeneralizedTimeConverter = {
|
|
|
3452
3453
|
toASN: (value) => new GeneralizedTime({ valueDate: value }),
|
|
3453
3454
|
};
|
|
3454
3455
|
const AsnNullConverter = {
|
|
3455
|
-
fromASN: (
|
|
3456
|
-
toASN: (
|
|
3456
|
+
fromASN: () => null,
|
|
3457
|
+
toASN: () => {
|
|
3457
3458
|
return new Null();
|
|
3458
3459
|
},
|
|
3459
3460
|
};
|
|
@@ -3605,7 +3606,7 @@ class OctetString {
|
|
|
3605
3606
|
}
|
|
3606
3607
|
|
|
3607
3608
|
function isConvertible(target) {
|
|
3608
|
-
if (target && target.prototype) {
|
|
3609
|
+
if (typeof target === "function" && target.prototype) {
|
|
3609
3610
|
if (target.prototype.toASN && target.prototype.fromASN) {
|
|
3610
3611
|
return true;
|
|
3611
3612
|
}
|
|
@@ -3614,7 +3615,7 @@ function isConvertible(target) {
|
|
|
3614
3615
|
}
|
|
3615
3616
|
}
|
|
3616
3617
|
else {
|
|
3617
|
-
return !!(target && target
|
|
3618
|
+
return !!(target && typeof target === "object" && "toASN" in target && "fromASN" in target);
|
|
3618
3619
|
}
|
|
3619
3620
|
}
|
|
3620
3621
|
function isTypeOfArray(target) {
|
|
@@ -3652,11 +3653,13 @@ class AsnSchemaStorage {
|
|
|
3652
3653
|
has(target) {
|
|
3653
3654
|
return this.items.has(target);
|
|
3654
3655
|
}
|
|
3655
|
-
get(target) {
|
|
3656
|
-
var _a, _b, _c;
|
|
3656
|
+
get(target, checkSchema = false) {
|
|
3657
3657
|
const schema = this.items.get(target);
|
|
3658
3658
|
if (!schema) {
|
|
3659
|
-
throw new Error(`Cannot get schema for '${
|
|
3659
|
+
throw new Error(`Cannot get schema for '${target.prototype.constructor.name}' target`);
|
|
3660
|
+
}
|
|
3661
|
+
if (checkSchema && !schema.schema) {
|
|
3662
|
+
throw new Error(`Schema '${target.prototype.constructor.name}' doesn't contain ASN.1 schema. Call 'AsnSchemaStorage.cache'.`);
|
|
3660
3663
|
}
|
|
3661
3664
|
return schema;
|
|
3662
3665
|
}
|
|
@@ -3687,7 +3690,7 @@ class AsnSchemaStorage {
|
|
|
3687
3690
|
let asn1Item;
|
|
3688
3691
|
if (typeof (item.type) === "number") {
|
|
3689
3692
|
const Asn1TypeName = AsnPropTypes[item.type];
|
|
3690
|
-
const Asn1Type =
|
|
3693
|
+
const Asn1Type = asn1js[Asn1TypeName];
|
|
3691
3694
|
if (!Asn1Type) {
|
|
3692
3695
|
throw new Error(`Cannot get ASN1 class by name '${Asn1TypeName}'`);
|
|
3693
3696
|
}
|
|
@@ -3745,9 +3748,9 @@ class AsnSchemaStorage {
|
|
|
3745
3748
|
this.cache(item.type);
|
|
3746
3749
|
const isRepeated = !!item.repeated;
|
|
3747
3750
|
let value = !isRepeated
|
|
3748
|
-
? this.get(item.type).schema
|
|
3751
|
+
? this.get(item.type, true).schema
|
|
3749
3752
|
: asn1Item;
|
|
3750
|
-
value =
|
|
3753
|
+
value = "valueBlock" in value ? value.valueBlock.value : value.value;
|
|
3751
3754
|
asn1Value.push(new Constructed({
|
|
3752
3755
|
name: !isRepeated ? name : "",
|
|
3753
3756
|
optional,
|
|
@@ -3755,7 +3758,7 @@ class AsnSchemaStorage {
|
|
|
3755
3758
|
tagClass: 3,
|
|
3756
3759
|
tagNumber: item.context,
|
|
3757
3760
|
},
|
|
3758
|
-
value,
|
|
3761
|
+
value: value,
|
|
3759
3762
|
}));
|
|
3760
3763
|
}
|
|
3761
3764
|
}
|
|
@@ -3877,15 +3880,19 @@ class AsnParser {
|
|
|
3877
3880
|
}
|
|
3878
3881
|
const res = new target();
|
|
3879
3882
|
if (isTypeOfArray(target)) {
|
|
3880
|
-
if (
|
|
3881
|
-
|
|
3883
|
+
if (!("value" in asn1Schema.valueBlock && Array.isArray(asn1Schema.valueBlock.value))) {
|
|
3884
|
+
throw new Error(`Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.`);
|
|
3885
|
+
}
|
|
3886
|
+
const itemType = schema.itemType;
|
|
3887
|
+
if (typeof itemType === "number") {
|
|
3888
|
+
const converter = defaultConverter(itemType);
|
|
3882
3889
|
if (!converter) {
|
|
3883
3890
|
throw new Error(`Cannot get default converter for array item of ${target.name} ASN1 schema`);
|
|
3884
3891
|
}
|
|
3885
3892
|
return target.from(asn1Schema.valueBlock.value, (element) => converter.fromASN(element));
|
|
3886
3893
|
}
|
|
3887
3894
|
else {
|
|
3888
|
-
return target.from(asn1Schema.valueBlock.value, (element) => this.fromASN(element,
|
|
3895
|
+
return target.from(asn1Schema.valueBlock.value, (element) => this.fromASN(element, itemType));
|
|
3889
3896
|
}
|
|
3890
3897
|
}
|
|
3891
3898
|
for (const key in schema.items) {
|
|
@@ -3894,9 +3901,10 @@ class AsnParser {
|
|
|
3894
3901
|
continue;
|
|
3895
3902
|
}
|
|
3896
3903
|
const schemaItem = schema.items[key];
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3904
|
+
const schemaItemType = schemaItem.type;
|
|
3905
|
+
if (typeof schemaItemType === "number" || isConvertible(schemaItemType)) {
|
|
3906
|
+
const converter = (_a = schemaItem.converter) !== null && _a !== void 0 ? _a : (isConvertible(schemaItemType)
|
|
3907
|
+
? new schemaItemType()
|
|
3900
3908
|
: null);
|
|
3901
3909
|
if (!converter) {
|
|
3902
3910
|
throw new Error("Converter is empty");
|
|
@@ -3908,7 +3916,14 @@ class AsnParser {
|
|
|
3908
3916
|
: Set;
|
|
3909
3917
|
const newItem = new Container();
|
|
3910
3918
|
newItem.valueBlock = asn1SchemaValue.valueBlock;
|
|
3911
|
-
const
|
|
3919
|
+
const newItemAsn = fromBER(newItem.toBER(false));
|
|
3920
|
+
if (newItemAsn.offset === -1) {
|
|
3921
|
+
throw new Error(`Cannot parse the child item. ${newItemAsn.result.error}`);
|
|
3922
|
+
}
|
|
3923
|
+
if (!("value" in newItemAsn.result.valueBlock && Array.isArray(newItemAsn.result.valueBlock.value))) {
|
|
3924
|
+
throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");
|
|
3925
|
+
}
|
|
3926
|
+
const value = newItemAsn.result.valueBlock.value;
|
|
3912
3927
|
res[key] = Array.from(value, (element) => converter.fromASN(element));
|
|
3913
3928
|
}
|
|
3914
3929
|
else {
|
|
@@ -3919,12 +3934,12 @@ class AsnParser {
|
|
|
3919
3934
|
let value = asn1SchemaValue;
|
|
3920
3935
|
if (schemaItem.implicit) {
|
|
3921
3936
|
let newItem;
|
|
3922
|
-
if (isConvertible(
|
|
3923
|
-
newItem = new
|
|
3937
|
+
if (isConvertible(schemaItemType)) {
|
|
3938
|
+
newItem = new schemaItemType().toSchema("");
|
|
3924
3939
|
}
|
|
3925
3940
|
else {
|
|
3926
|
-
const Asn1TypeName = AsnPropTypes[
|
|
3927
|
-
const Asn1Type =
|
|
3941
|
+
const Asn1TypeName = AsnPropTypes[schemaItemType];
|
|
3942
|
+
const Asn1Type = asn1js[Asn1TypeName];
|
|
3928
3943
|
if (!Asn1Type) {
|
|
3929
3944
|
throw new Error(`Cannot get '${Asn1TypeName}' class from asn1js module`);
|
|
3930
3945
|
}
|
|
@@ -3938,10 +3953,13 @@ class AsnParser {
|
|
|
3938
3953
|
}
|
|
3939
3954
|
else {
|
|
3940
3955
|
if (schemaItem.repeated) {
|
|
3941
|
-
|
|
3956
|
+
if (!Array.isArray(asn1SchemaValue)) {
|
|
3957
|
+
throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");
|
|
3958
|
+
}
|
|
3959
|
+
res[key] = Array.from(asn1SchemaValue, (element) => this.fromASN(element, schemaItemType));
|
|
3942
3960
|
}
|
|
3943
3961
|
else {
|
|
3944
|
-
res[key] = this.fromASN(asn1SchemaValue,
|
|
3962
|
+
res[key] = this.fromASN(asn1SchemaValue, schemaItemType);
|
|
3945
3963
|
}
|
|
3946
3964
|
}
|
|
3947
3965
|
}
|
|
@@ -3964,14 +3982,20 @@ class AsnSerializer {
|
|
|
3964
3982
|
return this.toASN(obj).toBER(false);
|
|
3965
3983
|
}
|
|
3966
3984
|
static toASN(obj) {
|
|
3967
|
-
if (obj && isConvertible(obj
|
|
3985
|
+
if (obj && typeof obj === "object" && isConvertible(obj)) {
|
|
3968
3986
|
return obj.toASN();
|
|
3969
3987
|
}
|
|
3988
|
+
if (!(obj && typeof obj === "object")) {
|
|
3989
|
+
throw new TypeError("Parameter 1 should be type of Object.");
|
|
3990
|
+
}
|
|
3970
3991
|
const target = obj.constructor;
|
|
3971
3992
|
const schema = schemaStorage.get(target);
|
|
3972
3993
|
schemaStorage.cache(target);
|
|
3973
3994
|
let asn1Value = [];
|
|
3974
3995
|
if (schema.itemType) {
|
|
3996
|
+
if (!Array.isArray(obj)) {
|
|
3997
|
+
throw new TypeError("Parameter 1 should be type of Array.");
|
|
3998
|
+
}
|
|
3975
3999
|
if (typeof schema.itemType === "number") {
|
|
3976
4000
|
const converter = defaultConverter(schema.itemType);
|
|
3977
4001
|
if (!converter) {
|
|
@@ -3993,13 +4017,13 @@ class AsnSerializer {
|
|
|
3993
4017
|
&& isArrayEqual(this.serialize(schemaItem.defaultValue), this.serialize(objProp)))) {
|
|
3994
4018
|
continue;
|
|
3995
4019
|
}
|
|
3996
|
-
|
|
4020
|
+
const asn1Item = AsnSerializer.toAsnItem(schemaItem, key, target, objProp);
|
|
3997
4021
|
if (typeof schemaItem.context === "number") {
|
|
3998
4022
|
if (schemaItem.implicit) {
|
|
3999
4023
|
if (!schemaItem.repeated
|
|
4000
4024
|
&& (typeof schemaItem.type === "number" || isConvertible(schemaItem.type))) {
|
|
4001
4025
|
const value = {};
|
|
4002
|
-
value.valueHex = asn1Item instanceof Null ? asn1Item.
|
|
4026
|
+
value.valueHex = asn1Item instanceof Null ? asn1Item.valueBeforeDecodeView : asn1Item.valueBlock.toBER();
|
|
4003
4027
|
asn1Value.push(new Primitive({
|
|
4004
4028
|
optional: schemaItem.optional,
|
|
4005
4029
|
idBlock: {
|
|
@@ -4064,6 +4088,9 @@ class AsnSerializer {
|
|
|
4064
4088
|
throw new Error(`Property '${key}' doesn't have converter for type ${AsnPropTypes[schemaItem.type]} in schema '${target.name}'`);
|
|
4065
4089
|
}
|
|
4066
4090
|
if (schemaItem.repeated) {
|
|
4091
|
+
if (!Array.isArray(objProp)) {
|
|
4092
|
+
throw new TypeError("Parameter 'objProp' should be type of Array.");
|
|
4093
|
+
}
|
|
4067
4094
|
const items = Array.from(objProp, (element) => converter.toASN(element));
|
|
4068
4095
|
const Container = schemaItem.repeated === "sequence"
|
|
4069
4096
|
? Sequence
|
|
@@ -4078,6 +4105,9 @@ class AsnSerializer {
|
|
|
4078
4105
|
}
|
|
4079
4106
|
else {
|
|
4080
4107
|
if (schemaItem.repeated) {
|
|
4108
|
+
if (!Array.isArray(objProp)) {
|
|
4109
|
+
throw new TypeError("Parameter 'objProp' should be type of Array.");
|
|
4110
|
+
}
|
|
4081
4111
|
const items = Array.from(objProp, (element) => this.toASN(element));
|
|
4082
4112
|
const Container = schemaItem.repeated === "sequence"
|
|
4083
4113
|
? Sequence
|
|
@@ -5429,7 +5459,7 @@ let DisplayText = class DisplayText {
|
|
|
5429
5459
|
Object.assign(this, params);
|
|
5430
5460
|
}
|
|
5431
5461
|
toString() {
|
|
5432
|
-
return this.ia5String || this.visibleString || this.bmpString || this.utf8String;
|
|
5462
|
+
return this.ia5String || this.visibleString || this.bmpString || this.utf8String || "";
|
|
5433
5463
|
}
|
|
5434
5464
|
};
|
|
5435
5465
|
__decorate([
|
|
@@ -5520,6 +5550,7 @@ CertificatePolicies = CertificatePolicies_1 = __decorate([
|
|
|
5520
5550
|
AsnType({ type: AsnTypeTypes.Sequence, itemType: PolicyInformation })
|
|
5521
5551
|
], CertificatePolicies);
|
|
5522
5552
|
|
|
5553
|
+
const id_ce_cRLNumber = `${id_ce}.20`;
|
|
5523
5554
|
let CRLNumber = class CRLNumber {
|
|
5524
5555
|
constructor(value = 0) {
|
|
5525
5556
|
this.value = value;
|
|
@@ -5532,6 +5563,7 @@ CRLNumber = __decorate([
|
|
|
5532
5563
|
AsnType({ type: AsnTypeTypes.Choice })
|
|
5533
5564
|
], CRLNumber);
|
|
5534
5565
|
|
|
5566
|
+
const id_ce_deltaCRLIndicator = `${id_ce}.27`;
|
|
5535
5567
|
let BaseCRLNumber = class BaseCRLNumber extends CRLNumber {
|
|
5536
5568
|
};
|
|
5537
5569
|
BaseCRLNumber = __decorate([
|
|
@@ -5638,6 +5670,7 @@ FreshestCRL = FreshestCRL_1 = __decorate([
|
|
|
5638
5670
|
AsnType({ type: AsnTypeTypes.Sequence, itemType: DistributionPoint })
|
|
5639
5671
|
], FreshestCRL);
|
|
5640
5672
|
|
|
5673
|
+
const id_ce_issuingDistributionPoint = `${id_ce}.28`;
|
|
5641
5674
|
class IssuingDistributionPoint {
|
|
5642
5675
|
constructor(params = {}) {
|
|
5643
5676
|
this.onlyContainsUserCerts = IssuingDistributionPoint.ONLY;
|
|
@@ -5646,29 +5679,25 @@ class IssuingDistributionPoint {
|
|
|
5646
5679
|
this.onlyContainsAttributeCerts = IssuingDistributionPoint.ONLY;
|
|
5647
5680
|
Object.assign(this, params);
|
|
5648
5681
|
}
|
|
5649
|
-
;
|
|
5650
|
-
;
|
|
5651
|
-
;
|
|
5652
|
-
;
|
|
5653
5682
|
}
|
|
5654
5683
|
IssuingDistributionPoint.ONLY = false;
|
|
5655
5684
|
__decorate([
|
|
5656
5685
|
AsnProp({ type: DistributionPointName, context: 0, optional: true })
|
|
5657
5686
|
], IssuingDistributionPoint.prototype, "distributionPoint", void 0);
|
|
5658
5687
|
__decorate([
|
|
5659
|
-
AsnProp({ type: AsnPropTypes.Boolean, context: 1, defaultValue: IssuingDistributionPoint.ONLY })
|
|
5688
|
+
AsnProp({ type: AsnPropTypes.Boolean, context: 1, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
|
|
5660
5689
|
], IssuingDistributionPoint.prototype, "onlyContainsUserCerts", void 0);
|
|
5661
5690
|
__decorate([
|
|
5662
|
-
AsnProp({ type: AsnPropTypes.Boolean, context: 2, defaultValue: IssuingDistributionPoint.ONLY })
|
|
5691
|
+
AsnProp({ type: AsnPropTypes.Boolean, context: 2, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
|
|
5663
5692
|
], IssuingDistributionPoint.prototype, "onlyContainsCACerts", void 0);
|
|
5664
5693
|
__decorate([
|
|
5665
|
-
AsnProp({ type: Reason, context: 3, optional: true })
|
|
5694
|
+
AsnProp({ type: Reason, context: 3, optional: true, implicit: true })
|
|
5666
5695
|
], IssuingDistributionPoint.prototype, "onlySomeReasons", void 0);
|
|
5667
5696
|
__decorate([
|
|
5668
|
-
AsnProp({ type: AsnPropTypes.Boolean, context: 4, defaultValue: IssuingDistributionPoint.ONLY })
|
|
5697
|
+
AsnProp({ type: AsnPropTypes.Boolean, context: 4, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
|
|
5669
5698
|
], IssuingDistributionPoint.prototype, "indirectCRL", void 0);
|
|
5670
5699
|
__decorate([
|
|
5671
|
-
AsnProp({ type: AsnPropTypes.Boolean, context: 5, defaultValue: IssuingDistributionPoint.ONLY })
|
|
5700
|
+
AsnProp({ type: AsnPropTypes.Boolean, context: 5, defaultValue: IssuingDistributionPoint.ONLY, implicit: true })
|
|
5672
5701
|
], IssuingDistributionPoint.prototype, "onlyContainsAttributeCerts", void 0);
|
|
5673
5702
|
|
|
5674
5703
|
const id_ce_cRLReasons = `${id_ce}.21`;
|
|
@@ -10053,6 +10082,9 @@ class Extension extends AsnData {
|
|
|
10053
10082
|
case '2.5.29.46':
|
|
10054
10083
|
this.value = AsnParser.parse(asnExtnValue, CRLDistributionPoints);
|
|
10055
10084
|
break;
|
|
10085
|
+
case id_ce_issuingDistributionPoint:
|
|
10086
|
+
this.value = AsnParser.parse(asnExtnValue, IssuingDistributionPoint);
|
|
10087
|
+
break;
|
|
10056
10088
|
case id_ce_cRLReasons:
|
|
10057
10089
|
this.value = AsnParser.parse(asnExtnValue, CRLReason);
|
|
10058
10090
|
break;
|
|
@@ -10141,6 +10173,12 @@ class Extension extends AsnData {
|
|
|
10141
10173
|
case id_pe_subjectInfoAccess:
|
|
10142
10174
|
this.value = AsnParser.parse(asnExtnValue, SubjectInfoAccessSyntax);
|
|
10143
10175
|
break;
|
|
10176
|
+
case id_ce_cRLNumber:
|
|
10177
|
+
this.value = AsnParser.parse(asnExtnValue, CRLNumber);
|
|
10178
|
+
break;
|
|
10179
|
+
case id_ce_deltaCRLIndicator:
|
|
10180
|
+
this.value = AsnParser.parse(asnExtnValue, BaseCRLNumber);
|
|
10181
|
+
break;
|
|
10144
10182
|
default:
|
|
10145
10183
|
console.warn(`Didn't detect parser for "${this.asn.extnID}" extension.`);
|
|
10146
10184
|
this.value = build.Convert.ToHex(asnExtnValue);
|
|
@@ -10881,6 +10919,107 @@ __decorate([
|
|
|
10881
10919
|
AsnProp({ type: EncapsulatedContent, context: 0, optional: true })
|
|
10882
10920
|
], EncapsulatedContentInfo.prototype, "eContent", void 0);
|
|
10883
10921
|
|
|
10922
|
+
var CMSVersion;
|
|
10923
|
+
(function (CMSVersion) {
|
|
10924
|
+
CMSVersion[CMSVersion["v0"] = 0] = "v0";
|
|
10925
|
+
CMSVersion[CMSVersion["v1"] = 1] = "v1";
|
|
10926
|
+
CMSVersion[CMSVersion["v2"] = 2] = "v2";
|
|
10927
|
+
CMSVersion[CMSVersion["v3"] = 3] = "v3";
|
|
10928
|
+
CMSVersion[CMSVersion["v4"] = 4] = "v4";
|
|
10929
|
+
CMSVersion[CMSVersion["v5"] = 5] = "v5";
|
|
10930
|
+
})(CMSVersion || (CMSVersion = {}));
|
|
10931
|
+
let DigestAlgorithmIdentifier = class DigestAlgorithmIdentifier extends AlgorithmIdentifier {
|
|
10932
|
+
};
|
|
10933
|
+
DigestAlgorithmIdentifier = __decorate([
|
|
10934
|
+
AsnType({ type: AsnTypeTypes.Sequence })
|
|
10935
|
+
], DigestAlgorithmIdentifier);
|
|
10936
|
+
let SignatureAlgorithmIdentifier = class SignatureAlgorithmIdentifier extends AlgorithmIdentifier {
|
|
10937
|
+
};
|
|
10938
|
+
SignatureAlgorithmIdentifier = __decorate([
|
|
10939
|
+
AsnType({ type: AsnTypeTypes.Sequence })
|
|
10940
|
+
], SignatureAlgorithmIdentifier);
|
|
10941
|
+
let KeyEncryptionAlgorithmIdentifier = class KeyEncryptionAlgorithmIdentifier extends AlgorithmIdentifier {
|
|
10942
|
+
};
|
|
10943
|
+
KeyEncryptionAlgorithmIdentifier = __decorate([
|
|
10944
|
+
AsnType({ type: AsnTypeTypes.Sequence })
|
|
10945
|
+
], KeyEncryptionAlgorithmIdentifier);
|
|
10946
|
+
let ContentEncryptionAlgorithmIdentifier = class ContentEncryptionAlgorithmIdentifier extends AlgorithmIdentifier {
|
|
10947
|
+
};
|
|
10948
|
+
ContentEncryptionAlgorithmIdentifier = __decorate([
|
|
10949
|
+
AsnType({ type: AsnTypeTypes.Sequence })
|
|
10950
|
+
], ContentEncryptionAlgorithmIdentifier);
|
|
10951
|
+
let MessageAuthenticationCodeAlgorithm = class MessageAuthenticationCodeAlgorithm extends AlgorithmIdentifier {
|
|
10952
|
+
};
|
|
10953
|
+
MessageAuthenticationCodeAlgorithm = __decorate([
|
|
10954
|
+
AsnType({ type: AsnTypeTypes.Sequence })
|
|
10955
|
+
], MessageAuthenticationCodeAlgorithm);
|
|
10956
|
+
let KeyDerivationAlgorithmIdentifier = class KeyDerivationAlgorithmIdentifier extends AlgorithmIdentifier {
|
|
10957
|
+
};
|
|
10958
|
+
KeyDerivationAlgorithmIdentifier = __decorate([
|
|
10959
|
+
AsnType({ type: AsnTypeTypes.Sequence })
|
|
10960
|
+
], KeyDerivationAlgorithmIdentifier);
|
|
10961
|
+
|
|
10962
|
+
let EncryptedContent = class EncryptedContent {
|
|
10963
|
+
constructor(params = {}) {
|
|
10964
|
+
Object.assign(this, params);
|
|
10965
|
+
}
|
|
10966
|
+
};
|
|
10967
|
+
__decorate([
|
|
10968
|
+
AsnProp({ type: OctetString })
|
|
10969
|
+
], EncryptedContent.prototype, "single", void 0);
|
|
10970
|
+
__decorate([
|
|
10971
|
+
AsnProp({ type: AsnPropTypes.Any })
|
|
10972
|
+
], EncryptedContent.prototype, "any", void 0);
|
|
10973
|
+
EncryptedContent = __decorate([
|
|
10974
|
+
AsnType({ type: AsnTypeTypes.Choice })
|
|
10975
|
+
], EncryptedContent);
|
|
10976
|
+
class ImplicitEncryptedContentInfo {
|
|
10977
|
+
constructor(params = {}) {
|
|
10978
|
+
this.contentType = "";
|
|
10979
|
+
this.contentEncryptionAlgorithm = new ContentEncryptionAlgorithmIdentifier();
|
|
10980
|
+
Object.assign(this, params);
|
|
10981
|
+
}
|
|
10982
|
+
}
|
|
10983
|
+
__decorate([
|
|
10984
|
+
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
|
|
10985
|
+
], ImplicitEncryptedContentInfo.prototype, "contentType", void 0);
|
|
10986
|
+
__decorate([
|
|
10987
|
+
AsnProp({ type: ContentEncryptionAlgorithmIdentifier })
|
|
10988
|
+
], ImplicitEncryptedContentInfo.prototype, "contentEncryptionAlgorithm", void 0);
|
|
10989
|
+
__decorate([
|
|
10990
|
+
AsnProp({ type: OctetString, context: 0, implicit: true, optional: true })
|
|
10991
|
+
], ImplicitEncryptedContentInfo.prototype, "encryptedContent", void 0);
|
|
10992
|
+
class ExplicitEncryptedContentInfo {
|
|
10993
|
+
constructor(params = {}) {
|
|
10994
|
+
this.contentType = "";
|
|
10995
|
+
this.contentEncryptionAlgorithm = new ContentEncryptionAlgorithmIdentifier();
|
|
10996
|
+
Object.assign(this, params);
|
|
10997
|
+
}
|
|
10998
|
+
}
|
|
10999
|
+
__decorate([
|
|
11000
|
+
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
|
|
11001
|
+
], ExplicitEncryptedContentInfo.prototype, "contentType", void 0);
|
|
11002
|
+
__decorate([
|
|
11003
|
+
AsnProp({ type: ContentEncryptionAlgorithmIdentifier })
|
|
11004
|
+
], ExplicitEncryptedContentInfo.prototype, "contentEncryptionAlgorithm", void 0);
|
|
11005
|
+
__decorate([
|
|
11006
|
+
AsnProp({ type: EncryptedContent, context: 0, optional: true })
|
|
11007
|
+
], ExplicitEncryptedContentInfo.prototype, "encryptedContent", void 0);
|
|
11008
|
+
let EncryptedContentInfo = class EncryptedContentInfo {
|
|
11009
|
+
constructor(params = {}) {
|
|
11010
|
+
Object.assign(this, params);
|
|
11011
|
+
}
|
|
11012
|
+
};
|
|
11013
|
+
__decorate([
|
|
11014
|
+
AsnProp({ type: ImplicitEncryptedContentInfo, optional: true })
|
|
11015
|
+
], EncryptedContentInfo.prototype, "implicitEncryptedContentInfo", void 0);
|
|
11016
|
+
__decorate([
|
|
11017
|
+
AsnProp({ type: ExplicitEncryptedContentInfo, optional: true })
|
|
11018
|
+
], EncryptedContentInfo.prototype, "explicitEncryptedContentInfo", void 0);
|
|
11019
|
+
EncryptedContentInfo = __decorate([
|
|
11020
|
+
AsnType({ type: AsnTypeTypes.Choice })
|
|
11021
|
+
], EncryptedContentInfo);
|
|
11022
|
+
|
|
10884
11023
|
class IssuerAndSerialNumber {
|
|
10885
11024
|
constructor(params = {}) {
|
|
10886
11025
|
this.issuer = new Name$1;
|
|
@@ -10895,6 +11034,268 @@ __decorate([
|
|
|
10895
11034
|
AsnProp({ type: AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter })
|
|
10896
11035
|
], IssuerAndSerialNumber.prototype, "serialNumber", void 0);
|
|
10897
11036
|
|
|
11037
|
+
class OtherKeyAttribute {
|
|
11038
|
+
constructor(params = {}) {
|
|
11039
|
+
this.keyAttrId = "";
|
|
11040
|
+
Object.assign(this, params);
|
|
11041
|
+
}
|
|
11042
|
+
}
|
|
11043
|
+
__decorate([
|
|
11044
|
+
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
|
|
11045
|
+
], OtherKeyAttribute.prototype, "keyAttrId", void 0);
|
|
11046
|
+
__decorate([
|
|
11047
|
+
AsnProp({ type: AsnPropTypes.Any, optional: true })
|
|
11048
|
+
], OtherKeyAttribute.prototype, "keyAttr", void 0);
|
|
11049
|
+
|
|
11050
|
+
var RecipientEncryptedKeys_1;
|
|
11051
|
+
class RecipientKeyIdentifier {
|
|
11052
|
+
constructor(params = {}) {
|
|
11053
|
+
this.subjectKeyIdentifier = new SubjectKeyIdentifier();
|
|
11054
|
+
Object.assign(this, params);
|
|
11055
|
+
}
|
|
11056
|
+
}
|
|
11057
|
+
__decorate([
|
|
11058
|
+
AsnProp({ type: SubjectKeyIdentifier })
|
|
11059
|
+
], RecipientKeyIdentifier.prototype, "subjectKeyIdentifier", void 0);
|
|
11060
|
+
__decorate([
|
|
11061
|
+
AsnProp({ type: AsnPropTypes.GeneralizedTime, optional: true })
|
|
11062
|
+
], RecipientKeyIdentifier.prototype, "date", void 0);
|
|
11063
|
+
__decorate([
|
|
11064
|
+
AsnProp({ type: OtherKeyAttribute, optional: true })
|
|
11065
|
+
], RecipientKeyIdentifier.prototype, "other", void 0);
|
|
11066
|
+
let KeyAgreeRecipientIdentifier = class KeyAgreeRecipientIdentifier {
|
|
11067
|
+
constructor(params = {}) {
|
|
11068
|
+
Object.assign(this, params);
|
|
11069
|
+
}
|
|
11070
|
+
};
|
|
11071
|
+
__decorate([
|
|
11072
|
+
AsnProp({ type: RecipientKeyIdentifier, context: 0, implicit: true, optional: true })
|
|
11073
|
+
], KeyAgreeRecipientIdentifier.prototype, "rKeyId", void 0);
|
|
11074
|
+
__decorate([
|
|
11075
|
+
AsnProp({ type: IssuerAndSerialNumber, optional: true })
|
|
11076
|
+
], KeyAgreeRecipientIdentifier.prototype, "issuerAndSerialNumber", void 0);
|
|
11077
|
+
KeyAgreeRecipientIdentifier = __decorate([
|
|
11078
|
+
AsnType({ type: AsnTypeTypes.Choice })
|
|
11079
|
+
], KeyAgreeRecipientIdentifier);
|
|
11080
|
+
class RecipientEncryptedKey {
|
|
11081
|
+
constructor(params = {}) {
|
|
11082
|
+
this.rid = new KeyAgreeRecipientIdentifier();
|
|
11083
|
+
this.encryptedKey = new OctetString();
|
|
11084
|
+
Object.assign(this, params);
|
|
11085
|
+
}
|
|
11086
|
+
}
|
|
11087
|
+
__decorate([
|
|
11088
|
+
AsnProp({ type: KeyAgreeRecipientIdentifier })
|
|
11089
|
+
], RecipientEncryptedKey.prototype, "rid", void 0);
|
|
11090
|
+
__decorate([
|
|
11091
|
+
AsnProp({ type: OctetString })
|
|
11092
|
+
], RecipientEncryptedKey.prototype, "encryptedKey", void 0);
|
|
11093
|
+
let RecipientEncryptedKeys = RecipientEncryptedKeys_1 = class RecipientEncryptedKeys extends AsnArray {
|
|
11094
|
+
constructor(items) {
|
|
11095
|
+
super(items);
|
|
11096
|
+
Object.setPrototypeOf(this, RecipientEncryptedKeys_1.prototype);
|
|
11097
|
+
}
|
|
11098
|
+
};
|
|
11099
|
+
RecipientEncryptedKeys = RecipientEncryptedKeys_1 = __decorate([
|
|
11100
|
+
AsnType({ type: AsnTypeTypes.Sequence, itemType: RecipientEncryptedKey })
|
|
11101
|
+
], RecipientEncryptedKeys);
|
|
11102
|
+
class OriginatorPublicKey {
|
|
11103
|
+
constructor(params = {}) {
|
|
11104
|
+
this.algorithm = new AlgorithmIdentifier();
|
|
11105
|
+
this.publicKey = new ArrayBuffer(0);
|
|
11106
|
+
Object.assign(this, params);
|
|
11107
|
+
}
|
|
11108
|
+
}
|
|
11109
|
+
__decorate([
|
|
11110
|
+
AsnProp({ type: AlgorithmIdentifier })
|
|
11111
|
+
], OriginatorPublicKey.prototype, "algorithm", void 0);
|
|
11112
|
+
__decorate([
|
|
11113
|
+
AsnProp({ type: AsnPropTypes.BitString })
|
|
11114
|
+
], OriginatorPublicKey.prototype, "publicKey", void 0);
|
|
11115
|
+
let OriginatorIdentifierOrKey = class OriginatorIdentifierOrKey {
|
|
11116
|
+
constructor(params = {}) {
|
|
11117
|
+
Object.assign(this, params);
|
|
11118
|
+
}
|
|
11119
|
+
};
|
|
11120
|
+
__decorate([
|
|
11121
|
+
AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true, optional: true })
|
|
11122
|
+
], OriginatorIdentifierOrKey.prototype, "subjectKeyIdentifier", void 0);
|
|
11123
|
+
__decorate([
|
|
11124
|
+
AsnProp({ type: OriginatorPublicKey, context: 1, implicit: true, optional: true })
|
|
11125
|
+
], OriginatorIdentifierOrKey.prototype, "originatorKey", void 0);
|
|
11126
|
+
__decorate([
|
|
11127
|
+
AsnProp({ type: IssuerAndSerialNumber, optional: true })
|
|
11128
|
+
], OriginatorIdentifierOrKey.prototype, "issuerAndSerialNumber", void 0);
|
|
11129
|
+
OriginatorIdentifierOrKey = __decorate([
|
|
11130
|
+
AsnType({ type: AsnTypeTypes.Choice })
|
|
11131
|
+
], OriginatorIdentifierOrKey);
|
|
11132
|
+
class KeyAgreeRecipientInfo {
|
|
11133
|
+
constructor(params = {}) {
|
|
11134
|
+
this.version = CMSVersion.v3;
|
|
11135
|
+
this.originator = new OriginatorIdentifierOrKey();
|
|
11136
|
+
this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
|
|
11137
|
+
this.recipientEncryptedKeys = new RecipientEncryptedKeys();
|
|
11138
|
+
Object.assign(this, params);
|
|
11139
|
+
}
|
|
11140
|
+
}
|
|
11141
|
+
__decorate([
|
|
11142
|
+
AsnProp({ type: AsnPropTypes.Integer })
|
|
11143
|
+
], KeyAgreeRecipientInfo.prototype, "version", void 0);
|
|
11144
|
+
__decorate([
|
|
11145
|
+
AsnProp({ type: OriginatorIdentifierOrKey, context: 0 })
|
|
11146
|
+
], KeyAgreeRecipientInfo.prototype, "originator", void 0);
|
|
11147
|
+
__decorate([
|
|
11148
|
+
AsnProp({ type: OctetString, context: 1, optional: true })
|
|
11149
|
+
], KeyAgreeRecipientInfo.prototype, "ukm", void 0);
|
|
11150
|
+
__decorate([
|
|
11151
|
+
AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
|
|
11152
|
+
], KeyAgreeRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
|
|
11153
|
+
__decorate([
|
|
11154
|
+
AsnProp({ type: RecipientEncryptedKeys })
|
|
11155
|
+
], KeyAgreeRecipientInfo.prototype, "recipientEncryptedKeys", void 0);
|
|
11156
|
+
|
|
11157
|
+
let RecipientIdentifier = class RecipientIdentifier {
|
|
11158
|
+
constructor(params = {}) {
|
|
11159
|
+
Object.assign(this, params);
|
|
11160
|
+
}
|
|
11161
|
+
};
|
|
11162
|
+
__decorate([
|
|
11163
|
+
AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true })
|
|
11164
|
+
], RecipientIdentifier.prototype, "subjectKeyIdentifier", void 0);
|
|
11165
|
+
__decorate([
|
|
11166
|
+
AsnProp({ type: IssuerAndSerialNumber })
|
|
11167
|
+
], RecipientIdentifier.prototype, "issuerAndSerialNumber", void 0);
|
|
11168
|
+
RecipientIdentifier = __decorate([
|
|
11169
|
+
AsnType({ type: AsnTypeTypes.Choice })
|
|
11170
|
+
], RecipientIdentifier);
|
|
11171
|
+
class KeyTransRecipientInfo {
|
|
11172
|
+
constructor(params = {}) {
|
|
11173
|
+
this.version = CMSVersion.v0;
|
|
11174
|
+
this.rid = new RecipientIdentifier();
|
|
11175
|
+
this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
|
|
11176
|
+
this.encryptedKey = new OctetString();
|
|
11177
|
+
Object.assign(this, params);
|
|
11178
|
+
}
|
|
11179
|
+
}
|
|
11180
|
+
__decorate([
|
|
11181
|
+
AsnProp({ type: AsnPropTypes.Integer })
|
|
11182
|
+
], KeyTransRecipientInfo.prototype, "version", void 0);
|
|
11183
|
+
__decorate([
|
|
11184
|
+
AsnProp({ type: RecipientIdentifier })
|
|
11185
|
+
], KeyTransRecipientInfo.prototype, "rid", void 0);
|
|
11186
|
+
__decorate([
|
|
11187
|
+
AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
|
|
11188
|
+
], KeyTransRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
|
|
11189
|
+
__decorate([
|
|
11190
|
+
AsnProp({ type: OctetString })
|
|
11191
|
+
], KeyTransRecipientInfo.prototype, "encryptedKey", void 0);
|
|
11192
|
+
|
|
11193
|
+
class KEKIdentifier {
|
|
11194
|
+
constructor(params = {}) {
|
|
11195
|
+
this.keyIdentifier = new OctetString();
|
|
11196
|
+
Object.assign(this, params);
|
|
11197
|
+
}
|
|
11198
|
+
}
|
|
11199
|
+
__decorate([
|
|
11200
|
+
AsnProp({ type: OctetString })
|
|
11201
|
+
], KEKIdentifier.prototype, "keyIdentifier", void 0);
|
|
11202
|
+
__decorate([
|
|
11203
|
+
AsnProp({ type: AsnPropTypes.GeneralizedTime, optional: true })
|
|
11204
|
+
], KEKIdentifier.prototype, "date", void 0);
|
|
11205
|
+
__decorate([
|
|
11206
|
+
AsnProp({ type: OtherKeyAttribute, optional: true })
|
|
11207
|
+
], KEKIdentifier.prototype, "other", void 0);
|
|
11208
|
+
class KEKRecipientInfo {
|
|
11209
|
+
constructor(params = {}) {
|
|
11210
|
+
this.version = CMSVersion.v4;
|
|
11211
|
+
this.kekid = new KEKIdentifier();
|
|
11212
|
+
this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
|
|
11213
|
+
this.encryptedKey = new OctetString();
|
|
11214
|
+
Object.assign(this, params);
|
|
11215
|
+
}
|
|
11216
|
+
}
|
|
11217
|
+
__decorate([
|
|
11218
|
+
AsnProp({ type: AsnPropTypes.Integer })
|
|
11219
|
+
], KEKRecipientInfo.prototype, "version", void 0);
|
|
11220
|
+
__decorate([
|
|
11221
|
+
AsnProp({ type: KEKIdentifier })
|
|
11222
|
+
], KEKRecipientInfo.prototype, "kekid", void 0);
|
|
11223
|
+
__decorate([
|
|
11224
|
+
AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
|
|
11225
|
+
], KEKRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
|
|
11226
|
+
__decorate([
|
|
11227
|
+
AsnProp({ type: OctetString })
|
|
11228
|
+
], KEKRecipientInfo.prototype, "encryptedKey", void 0);
|
|
11229
|
+
|
|
11230
|
+
class PasswordRecipientInfo {
|
|
11231
|
+
constructor(params = {}) {
|
|
11232
|
+
this.version = CMSVersion.v0;
|
|
11233
|
+
this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
|
|
11234
|
+
this.encryptedKey = new OctetString();
|
|
11235
|
+
Object.assign(this, params);
|
|
11236
|
+
}
|
|
11237
|
+
}
|
|
11238
|
+
__decorate([
|
|
11239
|
+
AsnProp({ type: AsnPropTypes.Integer })
|
|
11240
|
+
], PasswordRecipientInfo.prototype, "version", void 0);
|
|
11241
|
+
__decorate([
|
|
11242
|
+
AsnProp({ type: KeyDerivationAlgorithmIdentifier, context: 0, optional: true })
|
|
11243
|
+
], PasswordRecipientInfo.prototype, "keyDerivationAlgorithm", void 0);
|
|
11244
|
+
__decorate([
|
|
11245
|
+
AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
|
|
11246
|
+
], PasswordRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
|
|
11247
|
+
__decorate([
|
|
11248
|
+
AsnProp({ type: OctetString })
|
|
11249
|
+
], PasswordRecipientInfo.prototype, "encryptedKey", void 0);
|
|
11250
|
+
|
|
11251
|
+
class OtherRecipientInfo {
|
|
11252
|
+
constructor(params = {}) {
|
|
11253
|
+
this.oriType = "";
|
|
11254
|
+
this.oriValue = new ArrayBuffer(0);
|
|
11255
|
+
Object.assign(this, params);
|
|
11256
|
+
}
|
|
11257
|
+
}
|
|
11258
|
+
__decorate([
|
|
11259
|
+
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
|
|
11260
|
+
], OtherRecipientInfo.prototype, "oriType", void 0);
|
|
11261
|
+
__decorate([
|
|
11262
|
+
AsnProp({ type: AsnPropTypes.Any })
|
|
11263
|
+
], OtherRecipientInfo.prototype, "oriValue", void 0);
|
|
11264
|
+
let RecipientInfo = class RecipientInfo {
|
|
11265
|
+
constructor(params = {}) {
|
|
11266
|
+
Object.assign(this, params);
|
|
11267
|
+
}
|
|
11268
|
+
};
|
|
11269
|
+
__decorate([
|
|
11270
|
+
AsnProp({ type: KeyTransRecipientInfo, optional: true })
|
|
11271
|
+
], RecipientInfo.prototype, "ktri", void 0);
|
|
11272
|
+
__decorate([
|
|
11273
|
+
AsnProp({ type: KeyAgreeRecipientInfo, context: 1, implicit: true, optional: true })
|
|
11274
|
+
], RecipientInfo.prototype, "kari", void 0);
|
|
11275
|
+
__decorate([
|
|
11276
|
+
AsnProp({ type: KEKRecipientInfo, context: 2, implicit: true, optional: true })
|
|
11277
|
+
], RecipientInfo.prototype, "kekri", void 0);
|
|
11278
|
+
__decorate([
|
|
11279
|
+
AsnProp({ type: PasswordRecipientInfo, context: 3, implicit: true, optional: true })
|
|
11280
|
+
], RecipientInfo.prototype, "pwri", void 0);
|
|
11281
|
+
__decorate([
|
|
11282
|
+
AsnProp({ type: OtherRecipientInfo, context: 4, implicit: true, optional: true })
|
|
11283
|
+
], RecipientInfo.prototype, "ori", void 0);
|
|
11284
|
+
RecipientInfo = __decorate([
|
|
11285
|
+
AsnType({ type: AsnTypeTypes.Choice })
|
|
11286
|
+
], RecipientInfo);
|
|
11287
|
+
|
|
11288
|
+
var RecipientInfos_1;
|
|
11289
|
+
let RecipientInfos = RecipientInfos_1 = class RecipientInfos extends AsnArray {
|
|
11290
|
+
constructor(items) {
|
|
11291
|
+
super(items);
|
|
11292
|
+
Object.setPrototypeOf(this, RecipientInfos_1.prototype);
|
|
11293
|
+
}
|
|
11294
|
+
};
|
|
11295
|
+
RecipientInfos = RecipientInfos_1 = __decorate([
|
|
11296
|
+
AsnType({ type: AsnTypeTypes.Set, itemType: RecipientInfo })
|
|
11297
|
+
], RecipientInfos);
|
|
11298
|
+
|
|
10898
11299
|
var RevocationInfoChoices_1;
|
|
10899
11300
|
class OtherRevocationInfoFormat {
|
|
10900
11301
|
constructor(params = {}) {
|
|
@@ -10931,25 +11332,51 @@ RevocationInfoChoices = RevocationInfoChoices_1 = __decorate([
|
|
|
10931
11332
|
AsnType({ type: AsnTypeTypes.Set, itemType: RevocationInfoChoice })
|
|
10932
11333
|
], RevocationInfoChoices);
|
|
10933
11334
|
|
|
10934
|
-
|
|
10935
|
-
(
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
11335
|
+
class OriginatorInfo {
|
|
11336
|
+
constructor(params = {}) {
|
|
11337
|
+
Object.assign(this, params);
|
|
11338
|
+
}
|
|
11339
|
+
}
|
|
11340
|
+
__decorate([
|
|
11341
|
+
AsnProp({ type: CertificateSet, context: 0, implicit: true, optional: true })
|
|
11342
|
+
], OriginatorInfo.prototype, "certs", void 0);
|
|
11343
|
+
__decorate([
|
|
11344
|
+
AsnProp({ type: RevocationInfoChoices, context: 1, implicit: true, optional: true })
|
|
11345
|
+
], OriginatorInfo.prototype, "crls", void 0);
|
|
11346
|
+
|
|
11347
|
+
var UnprotectedAttributes_1;
|
|
11348
|
+
let UnprotectedAttributes = UnprotectedAttributes_1 = class UnprotectedAttributes extends AsnArray {
|
|
11349
|
+
constructor(items) {
|
|
11350
|
+
super(items);
|
|
11351
|
+
Object.setPrototypeOf(this, UnprotectedAttributes_1.prototype);
|
|
11352
|
+
}
|
|
10949
11353
|
};
|
|
10950
|
-
|
|
10951
|
-
AsnType({ type: AsnTypeTypes.
|
|
10952
|
-
],
|
|
11354
|
+
UnprotectedAttributes = UnprotectedAttributes_1 = __decorate([
|
|
11355
|
+
AsnType({ type: AsnTypeTypes.Set, itemType: Attribute })
|
|
11356
|
+
], UnprotectedAttributes);
|
|
11357
|
+
class EnvelopedData {
|
|
11358
|
+
constructor(params = {}) {
|
|
11359
|
+
this.version = CMSVersion.v0;
|
|
11360
|
+
this.recipientInfos = new RecipientInfos();
|
|
11361
|
+
this.encryptedContentInfo = new EncryptedContentInfo();
|
|
11362
|
+
Object.assign(this, params);
|
|
11363
|
+
}
|
|
11364
|
+
}
|
|
11365
|
+
__decorate([
|
|
11366
|
+
AsnProp({ type: AsnPropTypes.Integer })
|
|
11367
|
+
], EnvelopedData.prototype, "version", void 0);
|
|
11368
|
+
__decorate([
|
|
11369
|
+
AsnProp({ type: OriginatorInfo, context: 0, implicit: true, optional: true })
|
|
11370
|
+
], EnvelopedData.prototype, "originatorInfo", void 0);
|
|
11371
|
+
__decorate([
|
|
11372
|
+
AsnProp({ type: RecipientInfos })
|
|
11373
|
+
], EnvelopedData.prototype, "recipientInfos", void 0);
|
|
11374
|
+
__decorate([
|
|
11375
|
+
AsnProp({ type: EncryptedContentInfo })
|
|
11376
|
+
], EnvelopedData.prototype, "encryptedContentInfo", void 0);
|
|
11377
|
+
__decorate([
|
|
11378
|
+
AsnProp({ type: UnprotectedAttributes, context: 1, implicit: true, optional: true })
|
|
11379
|
+
], EnvelopedData.prototype, "unprotectedAttrs", void 0);
|
|
10953
11380
|
|
|
10954
11381
|
let SignerIdentifier = class SignerIdentifier {
|
|
10955
11382
|
constructor(params = {}) {
|
|
@@ -11506,4 +11933,4 @@ __decorate([
|
|
|
11506
11933
|
AsnProp({ type: AsnPropTypes.BitString })
|
|
11507
11934
|
], CertificationRequest.prototype, "signature", void 0);
|
|
11508
11935
|
|
|
11509
|
-
export {
|
|
11936
|
+
export { AsnIntegerArrayBufferConverter as $, AsnData as A, id_DomainNameTechnicalOperator as B, Certificate as C, DomainNameTechnicalOperator as D, Extension as E, id_DomainNameOwner as F, DomainNameOwner as G, id_DomainNameLegalRepresentative as H, InsuranceValue as I, DomainNameLegalRepresentative as J, id_DomainNameBeneficiary as K, DomainNameBeneficiary as L, AttributeCertificate as M, Name as N, CertificationRequest as O, CertificateList as P, OIDs as Q, RSAPublicKey as R, Name$1 as S, TypeRelationship as T, UnstructuredName as U, ValuationRanking as V, WebGDPR as W, OtherName as X, DisplayText as Y, UserNotice as Z, EDIPartyName as _, isX509Pem as a, KeyUsage as a0, BasicConstraints as a1, ExtendedKeyUsage as a2, SubjectKeyIdentifier as a3, AuthorityKeyIdentifier as a4, CRLDistributionPoints as a5, AuthorityInfoAccessSyntax as a6, SubjectInfoAccessSyntax as a7, SubjectAlternativeName as a8, CertificatePolicies as a9, CertificateTransparency as aa, NameConstraints as ab, CertificateTemplate as ac, EnrollCertTypeChoice as ad, CaVersion as ae, QCStatements as af, NetscapeComment as ag, NetscapeCertType as ah, LeiRole as ai, LeiChoice as aj, Timestamp as ak, ArchiveRevInfo as al, CRLReason as am, SubjectDirectoryAttributes as an, PrivateKeyUsagePeriod as ao, EntrustVersionInfo as ap, BiometricSyntax as aq, LogotypeExtn as ar, TNAuthorizationList as as, PolicyConstraints as at, PolicyMappings as au, CRLNumber as av, IssuingDistributionPoint as aw, isPkcs10Pem as b, isX509AttributePem as c, isX509CRLPem as d, certificateRawToBuffer as e, AsnConvert as f, id_ecPublicKey as g, ECParameters as h, isPem as i, id_rsaEncryption as j, hexFormat as k, base64Format as l, getCertificateThumbprint as m, Attribute$1 as n, id_pkcs9_at_extensionRequest as o, AsnParser as p, ExtensionRequest as q, id_pkcs9_at_unstructuredName as r, id_pkcs9_at_challengePassword as s, ChallengePassword as t, id_ValuationRanking as u, id_InsuranceValue as v, id_WebGDPR as w, id_ActivityDescription as x, ActivityDescription as y, id_TypeRelationship as z };
|