first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Attribute = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
class Attribute {
constructor(params = {}) {
this.attrType = "";
this.attrValues = [];
Object.assign(this, params);
}
}
exports.Attribute = Attribute;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], Attribute.prototype, "attrType", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any, repeated: "set" })
], Attribute.prototype, "attrValues", void 0);
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CounterSignature = exports.id_counterSignature = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const signer_info_1 = require("../signer_info");
exports.id_counterSignature = "1.2.840.113549.1.9.6";
let CounterSignature = class CounterSignature extends signer_info_1.SignerInfo {
};
exports.CounterSignature = CounterSignature;
exports.CounterSignature = CounterSignature = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence })
], CounterSignature);
+8
View File
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.id_contentType = void 0;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./counter_signature"), exports);
tslib_1.__exportStar(require("./message_digest"), exports);
tslib_1.__exportStar(require("./signing_time"), exports);
exports.id_contentType = "1.2.840.113549.1.9.3";
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MessageDigest = exports.id_messageDigest = void 0;
const asn1_schema_1 = require("@peculiar/asn1-schema");
exports.id_messageDigest = "1.2.840.113549.1.9.4";
class MessageDigest extends asn1_schema_1.OctetString {
}
exports.MessageDigest = MessageDigest;
+13
View File
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SigningTime = exports.id_signingTime = void 0;
const tslib_1 = require("tslib");
const asn1_x509_1 = require("@peculiar/asn1-x509");
const asn1_schema_1 = require("@peculiar/asn1-schema");
exports.id_signingTime = "1.2.840.113549.1.9.5";
let SigningTime = class SigningTime extends asn1_x509_1.Time {
};
exports.SigningTime = SigningTime;
exports.SigningTime = SigningTime = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], SigningTime);
+50
View File
@@ -0,0 +1,50 @@
"use strict";
var CertificateSet_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CertificateSet = exports.CertificateChoices = exports.OtherCertificateFormat = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const asn1_x509_1 = require("@peculiar/asn1-x509");
const asn1_x509_attr_1 = require("@peculiar/asn1-x509-attr");
class OtherCertificateFormat {
constructor(params = {}) {
this.otherCertFormat = "";
this.otherCert = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.OtherCertificateFormat = OtherCertificateFormat;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], OtherCertificateFormat.prototype, "otherCertFormat", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any })
], OtherCertificateFormat.prototype, "otherCert", void 0);
let CertificateChoices = class CertificateChoices {
constructor(params = {}) {
Object.assign(this, params);
}
};
exports.CertificateChoices = CertificateChoices;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.Certificate })
], CertificateChoices.prototype, "certificate", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_attr_1.AttributeCertificate, context: 2, implicit: true })
], CertificateChoices.prototype, "v2AttrCert", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: OtherCertificateFormat, context: 3, implicit: true })
], CertificateChoices.prototype, "other", void 0);
exports.CertificateChoices = CertificateChoices = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], CertificateChoices);
let CertificateSet = CertificateSet_1 = class CertificateSet extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, CertificateSet_1.prototype);
}
};
exports.CertificateSet = CertificateSet;
exports.CertificateSet = CertificateSet = CertificateSet_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Set, itemType: CertificateChoices })
], CertificateSet);
+19
View File
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContentInfo = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
class ContentInfo {
constructor(params = {}) {
this.contentType = "";
this.content = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.ContentInfo = ContentInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], ContentInfo.prototype, "contentType", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any, context: 0 })
], ContentInfo.prototype, "content", void 0);
+33
View File
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EncapsulatedContentInfo = exports.EncapsulatedContent = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
let EncapsulatedContent = class EncapsulatedContent {
constructor(params = {}) {
Object.assign(this, params);
}
};
exports.EncapsulatedContent = EncapsulatedContent;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], EncapsulatedContent.prototype, "single", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any })
], EncapsulatedContent.prototype, "any", void 0);
exports.EncapsulatedContent = EncapsulatedContent = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], EncapsulatedContent);
class EncapsulatedContentInfo {
constructor(params = {}) {
this.eContentType = "";
Object.assign(this, params);
}
}
exports.EncapsulatedContentInfo = EncapsulatedContentInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], EncapsulatedContentInfo.prototype, "eContentType", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: EncapsulatedContent, context: 0, optional: true })
], EncapsulatedContentInfo.prototype, "eContent", void 0);
+45
View File
@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EncryptedContentInfo = exports.EncryptedContent = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const types_1 = require("./types");
let EncryptedContent = class EncryptedContent {
constructor(params = {}) {
Object.assign(this, params);
}
};
exports.EncryptedContent = EncryptedContent;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString, context: 0, implicit: true, optional: true })
], EncryptedContent.prototype, "value", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_1.OctetString,
converter: asn1_schema_1.AsnConstructedOctetStringConverter,
context: 0,
implicit: true,
optional: true,
repeated: "sequence",
})
], EncryptedContent.prototype, "constructedValue", void 0);
exports.EncryptedContent = EncryptedContent = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], EncryptedContent);
class EncryptedContentInfo {
constructor(params = {}) {
this.contentType = "";
this.contentEncryptionAlgorithm = new types_1.ContentEncryptionAlgorithmIdentifier();
Object.assign(this, params);
}
}
exports.EncryptedContentInfo = EncryptedContentInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], EncryptedContentInfo.prototype, "contentType", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: types_1.ContentEncryptionAlgorithmIdentifier })
], EncryptedContentInfo.prototype, "contentEncryptionAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: EncryptedContent, optional: true })
], EncryptedContentInfo.prototype, "encryptedContent", void 0);
+45
View File
@@ -0,0 +1,45 @@
"use strict";
var UnprotectedAttributes_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EnvelopedData = exports.UnprotectedAttributes = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const types_1 = require("./types");
const attribute_1 = require("./attribute");
const recipient_infos_1 = require("./recipient_infos");
const originator_info_1 = require("./originator_info");
const encrypted_content_info_1 = require("./encrypted_content_info");
let UnprotectedAttributes = UnprotectedAttributes_1 = class UnprotectedAttributes extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, UnprotectedAttributes_1.prototype);
}
};
exports.UnprotectedAttributes = UnprotectedAttributes;
exports.UnprotectedAttributes = UnprotectedAttributes = UnprotectedAttributes_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Set, itemType: attribute_1.Attribute })
], UnprotectedAttributes);
class EnvelopedData {
constructor(params = {}) {
this.version = types_1.CMSVersion.v0;
this.recipientInfos = new recipient_infos_1.RecipientInfos();
this.encryptedContentInfo = new encrypted_content_info_1.EncryptedContentInfo();
Object.assign(this, params);
}
}
exports.EnvelopedData = EnvelopedData;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], EnvelopedData.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: originator_info_1.OriginatorInfo, context: 0, implicit: true, optional: true })
], EnvelopedData.prototype, "originatorInfo", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: recipient_infos_1.RecipientInfos })
], EnvelopedData.prototype, "recipientInfos", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: encrypted_content_info_1.EncryptedContentInfo })
], EnvelopedData.prototype, "encryptedContentInfo", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: UnprotectedAttributes, context: 1, implicit: true, optional: true })
], EnvelopedData.prototype, "unprotectedAttrs", void 0);
+24
View File
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./attributes"), exports);
tslib_1.__exportStar(require("./attribute"), exports);
tslib_1.__exportStar(require("./certificate_choices"), exports);
tslib_1.__exportStar(require("./content_info"), exports);
tslib_1.__exportStar(require("./encapsulated_content_info"), exports);
tslib_1.__exportStar(require("./encrypted_content_info"), exports);
tslib_1.__exportStar(require("./enveloped_data"), exports);
tslib_1.__exportStar(require("./issuer_and_serial_number"), exports);
tslib_1.__exportStar(require("./kek_recipient_info"), exports);
tslib_1.__exportStar(require("./key_agree_recipient_info"), exports);
tslib_1.__exportStar(require("./key_trans_recipient_info"), exports);
tslib_1.__exportStar(require("./object_identifiers"), exports);
tslib_1.__exportStar(require("./originator_info"), exports);
tslib_1.__exportStar(require("./password_recipient_info"), exports);
tslib_1.__exportStar(require("./recipient_info"), exports);
tslib_1.__exportStar(require("./recipient_infos"), exports);
tslib_1.__exportStar(require("./revocation_info_choice"), exports);
tslib_1.__exportStar(require("./signed_data"), exports);
tslib_1.__exportStar(require("./signer_identifier"), exports);
tslib_1.__exportStar(require("./signer_info"), exports);
tslib_1.__exportStar(require("./types"), exports);
+20
View File
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IssuerAndSerialNumber = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const asn1_x509_1 = require("@peculiar/asn1-x509");
class IssuerAndSerialNumber {
constructor(params = {}) {
this.issuer = new asn1_x509_1.Name();
this.serialNumber = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.IssuerAndSerialNumber = IssuerAndSerialNumber;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.Name })
], IssuerAndSerialNumber.prototype, "issuer", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer, converter: asn1_schema_1.AsnIntegerArrayBufferConverter })
], IssuerAndSerialNumber.prototype, "serialNumber", void 0);
+45
View File
@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KEKRecipientInfo = exports.KEKIdentifier = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const other_key_attribute_1 = require("./other_key_attribute");
const types_1 = require("./types");
class KEKIdentifier {
constructor(params = {}) {
this.keyIdentifier = new asn1_schema_1.OctetString();
Object.assign(this, params);
}
}
exports.KEKIdentifier = KEKIdentifier;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], KEKIdentifier.prototype, "keyIdentifier", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.GeneralizedTime, optional: true })
], KEKIdentifier.prototype, "date", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: other_key_attribute_1.OtherKeyAttribute, optional: true })
], KEKIdentifier.prototype, "other", void 0);
class KEKRecipientInfo {
constructor(params = {}) {
this.version = types_1.CMSVersion.v4;
this.kekid = new KEKIdentifier();
this.keyEncryptionAlgorithm = new types_1.KeyEncryptionAlgorithmIdentifier();
this.encryptedKey = new asn1_schema_1.OctetString();
Object.assign(this, params);
}
}
exports.KEKRecipientInfo = KEKRecipientInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], KEKRecipientInfo.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: KEKIdentifier })
], KEKRecipientInfo.prototype, "kekid", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: types_1.KeyEncryptionAlgorithmIdentifier })
], KEKRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], KEKRecipientInfo.prototype, "encryptedKey", void 0);
+122
View File
@@ -0,0 +1,122 @@
"use strict";
var RecipientEncryptedKeys_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyAgreeRecipientInfo = exports.OriginatorIdentifierOrKey = exports.OriginatorPublicKey = exports.RecipientEncryptedKeys = exports.RecipientEncryptedKey = exports.KeyAgreeRecipientIdentifier = exports.RecipientKeyIdentifier = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const types_1 = require("./types");
const issuer_and_serial_number_1 = require("./issuer_and_serial_number");
const asn1_x509_1 = require("@peculiar/asn1-x509");
const other_key_attribute_1 = require("./other_key_attribute");
class RecipientKeyIdentifier {
constructor(params = {}) {
this.subjectKeyIdentifier = new asn1_x509_1.SubjectKeyIdentifier();
Object.assign(this, params);
}
}
exports.RecipientKeyIdentifier = RecipientKeyIdentifier;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.SubjectKeyIdentifier })
], RecipientKeyIdentifier.prototype, "subjectKeyIdentifier", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.GeneralizedTime, optional: true })
], RecipientKeyIdentifier.prototype, "date", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: other_key_attribute_1.OtherKeyAttribute, optional: true })
], RecipientKeyIdentifier.prototype, "other", void 0);
let KeyAgreeRecipientIdentifier = class KeyAgreeRecipientIdentifier {
constructor(params = {}) {
Object.assign(this, params);
}
};
exports.KeyAgreeRecipientIdentifier = KeyAgreeRecipientIdentifier;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: RecipientKeyIdentifier, context: 0, implicit: true, optional: true })
], KeyAgreeRecipientIdentifier.prototype, "rKeyId", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: issuer_and_serial_number_1.IssuerAndSerialNumber, optional: true })
], KeyAgreeRecipientIdentifier.prototype, "issuerAndSerialNumber", void 0);
exports.KeyAgreeRecipientIdentifier = KeyAgreeRecipientIdentifier = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], KeyAgreeRecipientIdentifier);
class RecipientEncryptedKey {
constructor(params = {}) {
this.rid = new KeyAgreeRecipientIdentifier();
this.encryptedKey = new asn1_schema_1.OctetString();
Object.assign(this, params);
}
}
exports.RecipientEncryptedKey = RecipientEncryptedKey;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: KeyAgreeRecipientIdentifier })
], RecipientEncryptedKey.prototype, "rid", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], RecipientEncryptedKey.prototype, "encryptedKey", void 0);
let RecipientEncryptedKeys = RecipientEncryptedKeys_1 = class RecipientEncryptedKeys extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, RecipientEncryptedKeys_1.prototype);
}
};
exports.RecipientEncryptedKeys = RecipientEncryptedKeys;
exports.RecipientEncryptedKeys = RecipientEncryptedKeys = RecipientEncryptedKeys_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence, itemType: RecipientEncryptedKey })
], RecipientEncryptedKeys);
class OriginatorPublicKey {
constructor(params = {}) {
this.algorithm = new asn1_x509_1.AlgorithmIdentifier();
this.publicKey = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.OriginatorPublicKey = OriginatorPublicKey;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.AlgorithmIdentifier })
], OriginatorPublicKey.prototype, "algorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.BitString })
], OriginatorPublicKey.prototype, "publicKey", void 0);
let OriginatorIdentifierOrKey = class OriginatorIdentifierOrKey {
constructor(params = {}) {
Object.assign(this, params);
}
};
exports.OriginatorIdentifierOrKey = OriginatorIdentifierOrKey;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.SubjectKeyIdentifier, context: 0, implicit: true, optional: true })
], OriginatorIdentifierOrKey.prototype, "subjectKeyIdentifier", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: OriginatorPublicKey, context: 1, implicit: true, optional: true })
], OriginatorIdentifierOrKey.prototype, "originatorKey", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: issuer_and_serial_number_1.IssuerAndSerialNumber, optional: true })
], OriginatorIdentifierOrKey.prototype, "issuerAndSerialNumber", void 0);
exports.OriginatorIdentifierOrKey = OriginatorIdentifierOrKey = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], OriginatorIdentifierOrKey);
class KeyAgreeRecipientInfo {
constructor(params = {}) {
this.version = types_1.CMSVersion.v3;
this.originator = new OriginatorIdentifierOrKey();
this.keyEncryptionAlgorithm = new types_1.KeyEncryptionAlgorithmIdentifier();
this.recipientEncryptedKeys = new RecipientEncryptedKeys();
Object.assign(this, params);
}
}
exports.KeyAgreeRecipientInfo = KeyAgreeRecipientInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], KeyAgreeRecipientInfo.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: OriginatorIdentifierOrKey, context: 0 })
], KeyAgreeRecipientInfo.prototype, "originator", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString, context: 1, optional: true })
], KeyAgreeRecipientInfo.prototype, "ukm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: types_1.KeyEncryptionAlgorithmIdentifier })
], KeyAgreeRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: RecipientEncryptedKeys })
], KeyAgreeRecipientInfo.prototype, "recipientEncryptedKeys", void 0);
+45
View File
@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyTransRecipientInfo = exports.RecipientIdentifier = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const types_1 = require("./types");
const issuer_and_serial_number_1 = require("./issuer_and_serial_number");
const asn1_x509_1 = require("@peculiar/asn1-x509");
let RecipientIdentifier = class RecipientIdentifier {
constructor(params = {}) {
Object.assign(this, params);
}
};
exports.RecipientIdentifier = RecipientIdentifier;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.SubjectKeyIdentifier, context: 0, implicit: true })
], RecipientIdentifier.prototype, "subjectKeyIdentifier", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: issuer_and_serial_number_1.IssuerAndSerialNumber })
], RecipientIdentifier.prototype, "issuerAndSerialNumber", void 0);
exports.RecipientIdentifier = RecipientIdentifier = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], RecipientIdentifier);
class KeyTransRecipientInfo {
constructor(params = {}) {
this.version = types_1.CMSVersion.v0;
this.rid = new RecipientIdentifier();
this.keyEncryptionAlgorithm = new types_1.KeyEncryptionAlgorithmIdentifier();
this.encryptedKey = new asn1_schema_1.OctetString();
Object.assign(this, params);
}
}
exports.KeyTransRecipientInfo = KeyTransRecipientInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], KeyTransRecipientInfo.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: RecipientIdentifier })
], KeyTransRecipientInfo.prototype, "rid", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: types_1.KeyEncryptionAlgorithmIdentifier })
], KeyTransRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], KeyTransRecipientInfo.prototype, "encryptedKey", void 0);
+10
View File
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.id_authData = exports.id_encryptedData = exports.id_digestedData = exports.id_envelopedData = exports.id_signedData = exports.id_data = exports.id_ct_contentInfo = void 0;
exports.id_ct_contentInfo = "1.2.840.113549.1.9.16.1.6";
exports.id_data = "1.2.840.113549.1.7.1";
exports.id_signedData = "1.2.840.113549.1.7.2";
exports.id_envelopedData = "1.2.840.113549.1.7.3";
exports.id_digestedData = "1.2.840.113549.1.7.5";
exports.id_encryptedData = "1.2.840.113549.1.7.6";
exports.id_authData = "1.2.840.113549.1.9.16.1.2";
+19
View File
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OriginatorInfo = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const certificate_choices_1 = require("./certificate_choices");
const revocation_info_choice_1 = require("./revocation_info_choice");
class OriginatorInfo {
constructor(params = {}) {
Object.assign(this, params);
}
}
exports.OriginatorInfo = OriginatorInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: certificate_choices_1.CertificateSet, context: 0, implicit: true, optional: true })
], OriginatorInfo.prototype, "certs", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: revocation_info_choice_1.RevocationInfoChoices, context: 1, implicit: true, optional: true })
], OriginatorInfo.prototype, "crls", void 0);
+18
View File
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OtherKeyAttribute = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
class OtherKeyAttribute {
constructor(params = {}) {
this.keyAttrId = "";
Object.assign(this, params);
}
}
exports.OtherKeyAttribute = OtherKeyAttribute;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], OtherKeyAttribute.prototype, "keyAttrId", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any, optional: true })
], OtherKeyAttribute.prototype, "keyAttr", void 0);
+27
View File
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PasswordRecipientInfo = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const types_1 = require("./types");
class PasswordRecipientInfo {
constructor(params = {}) {
this.version = types_1.CMSVersion.v0;
this.keyEncryptionAlgorithm = new types_1.KeyEncryptionAlgorithmIdentifier();
this.encryptedKey = new asn1_schema_1.OctetString();
Object.assign(this, params);
}
}
exports.PasswordRecipientInfo = PasswordRecipientInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], PasswordRecipientInfo.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: types_1.KeyDerivationAlgorithmIdentifier, context: 0, optional: true })
], PasswordRecipientInfo.prototype, "keyDerivationAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: types_1.KeyEncryptionAlgorithmIdentifier })
], PasswordRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], PasswordRecipientInfo.prototype, "encryptedKey", void 0);
+47
View File
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecipientInfo = exports.OtherRecipientInfo = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const key_agree_recipient_info_1 = require("./key_agree_recipient_info");
const key_trans_recipient_info_1 = require("./key_trans_recipient_info");
const kek_recipient_info_1 = require("./kek_recipient_info");
const password_recipient_info_1 = require("./password_recipient_info");
class OtherRecipientInfo {
constructor(params = {}) {
this.oriType = "";
this.oriValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.OtherRecipientInfo = OtherRecipientInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], OtherRecipientInfo.prototype, "oriType", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any })
], OtherRecipientInfo.prototype, "oriValue", void 0);
let RecipientInfo = class RecipientInfo {
constructor(params = {}) {
Object.assign(this, params);
}
};
exports.RecipientInfo = RecipientInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: key_trans_recipient_info_1.KeyTransRecipientInfo, optional: true })
], RecipientInfo.prototype, "ktri", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: key_agree_recipient_info_1.KeyAgreeRecipientInfo, context: 1, implicit: true, optional: true })
], RecipientInfo.prototype, "kari", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: kek_recipient_info_1.KEKRecipientInfo, context: 2, implicit: true, optional: true })
], RecipientInfo.prototype, "kekri", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: password_recipient_info_1.PasswordRecipientInfo, context: 3, implicit: true, optional: true })
], RecipientInfo.prototype, "pwri", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: OtherRecipientInfo, context: 4, implicit: true, optional: true })
], RecipientInfo.prototype, "ori", void 0);
exports.RecipientInfo = RecipientInfo = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], RecipientInfo);
+17
View File
@@ -0,0 +1,17 @@
"use strict";
var RecipientInfos_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecipientInfos = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const recipient_info_1 = require("./recipient_info");
let RecipientInfos = RecipientInfos_1 = class RecipientInfos extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, RecipientInfos_1.prototype);
}
};
exports.RecipientInfos = RecipientInfos;
exports.RecipientInfos = RecipientInfos = RecipientInfos_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Set, itemType: recipient_info_1.RecipientInfo })
], RecipientInfos);
+47
View File
@@ -0,0 +1,47 @@
"use strict";
var RevocationInfoChoices_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RevocationInfoChoices = exports.RevocationInfoChoice = exports.OtherRevocationInfoFormat = exports.id_ri_scvp = exports.id_ri_ocsp_response = exports.id_ri = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const asn1_x509_1 = require("@peculiar/asn1-x509");
exports.id_ri = `${asn1_x509_1.id_pkix}.16`;
exports.id_ri_ocsp_response = `${exports.id_ri}.2`;
exports.id_ri_scvp = `${exports.id_ri}.4`;
class OtherRevocationInfoFormat {
constructor(params = {}) {
this.otherRevInfoFormat = "";
this.otherRevInfo = new ArrayBuffer(0);
Object.assign(this, params);
}
}
exports.OtherRevocationInfoFormat = OtherRevocationInfoFormat;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], OtherRevocationInfoFormat.prototype, "otherRevInfoFormat", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any })
], OtherRevocationInfoFormat.prototype, "otherRevInfo", void 0);
let RevocationInfoChoice = class RevocationInfoChoice {
constructor(params = {}) {
this.other = new OtherRevocationInfoFormat();
Object.assign(this, params);
}
};
exports.RevocationInfoChoice = RevocationInfoChoice;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: OtherRevocationInfoFormat, context: 1, implicit: true })
], RevocationInfoChoice.prototype, "other", void 0);
exports.RevocationInfoChoice = RevocationInfoChoice = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], RevocationInfoChoice);
let RevocationInfoChoices = RevocationInfoChoices_1 = class RevocationInfoChoices extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, RevocationInfoChoices_1.prototype);
}
};
exports.RevocationInfoChoices = RevocationInfoChoices;
exports.RevocationInfoChoices = RevocationInfoChoices = RevocationInfoChoices_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Set, itemType: RevocationInfoChoice })
], RevocationInfoChoices);
+49
View File
@@ -0,0 +1,49 @@
"use strict";
var DigestAlgorithmIdentifiers_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SignedData = exports.DigestAlgorithmIdentifiers = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const certificate_choices_1 = require("./certificate_choices");
const types_1 = require("./types");
const encapsulated_content_info_1 = require("./encapsulated_content_info");
const revocation_info_choice_1 = require("./revocation_info_choice");
const signer_info_1 = require("./signer_info");
let DigestAlgorithmIdentifiers = DigestAlgorithmIdentifiers_1 = class DigestAlgorithmIdentifiers extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, DigestAlgorithmIdentifiers_1.prototype);
}
};
exports.DigestAlgorithmIdentifiers = DigestAlgorithmIdentifiers;
exports.DigestAlgorithmIdentifiers = DigestAlgorithmIdentifiers = DigestAlgorithmIdentifiers_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Set, itemType: types_1.DigestAlgorithmIdentifier })
], DigestAlgorithmIdentifiers);
class SignedData {
constructor(params = {}) {
this.version = types_1.CMSVersion.v0;
this.digestAlgorithms = new DigestAlgorithmIdentifiers();
this.encapContentInfo = new encapsulated_content_info_1.EncapsulatedContentInfo();
this.signerInfos = new signer_info_1.SignerInfos();
Object.assign(this, params);
}
}
exports.SignedData = SignedData;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], SignedData.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: DigestAlgorithmIdentifiers })
], SignedData.prototype, "digestAlgorithms", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: encapsulated_content_info_1.EncapsulatedContentInfo })
], SignedData.prototype, "encapContentInfo", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: certificate_choices_1.CertificateSet, context: 0, implicit: true, optional: true })
], SignedData.prototype, "certificates", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: revocation_info_choice_1.RevocationInfoChoices, context: 1, implicit: true, optional: true })
], SignedData.prototype, "crls", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: signer_info_1.SignerInfos })
], SignedData.prototype, "signerInfos", void 0);
+22
View File
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SignerIdentifier = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const issuer_and_serial_number_1 = require("./issuer_and_serial_number");
const asn1_x509_1 = require("@peculiar/asn1-x509");
let SignerIdentifier = class SignerIdentifier {
constructor(params = {}) {
Object.assign(this, params);
}
};
exports.SignerIdentifier = SignerIdentifier;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.SubjectKeyIdentifier, context: 0, implicit: true })
], SignerIdentifier.prototype, "subjectKeyIdentifier", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: issuer_and_serial_number_1.IssuerAndSerialNumber })
], SignerIdentifier.prototype, "issuerAndSerialNumber", void 0);
exports.SignerIdentifier = SignerIdentifier = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], SignerIdentifier);
+58
View File
@@ -0,0 +1,58 @@
"use strict";
var SignerInfos_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SignerInfos = exports.SignerInfo = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const signer_identifier_1 = require("./signer_identifier");
const types_1 = require("./types");
const attribute_1 = require("./attribute");
class SignerInfo {
constructor(params = {}) {
this.version = types_1.CMSVersion.v0;
this.sid = new signer_identifier_1.SignerIdentifier();
this.digestAlgorithm = new types_1.DigestAlgorithmIdentifier();
this.signatureAlgorithm = new types_1.SignatureAlgorithmIdentifier();
this.signature = new asn1_schema_1.OctetString();
Object.assign(this, params);
}
}
exports.SignerInfo = SignerInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], SignerInfo.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: signer_identifier_1.SignerIdentifier })
], SignerInfo.prototype, "sid", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: types_1.DigestAlgorithmIdentifier })
], SignerInfo.prototype, "digestAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: attribute_1.Attribute,
repeated: "set",
context: 0,
implicit: true,
optional: true,
raw: true,
})
], SignerInfo.prototype, "signedAttrs", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: types_1.SignatureAlgorithmIdentifier })
], SignerInfo.prototype, "signatureAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], SignerInfo.prototype, "signature", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: attribute_1.Attribute, repeated: "set", context: 1, implicit: true, optional: true })
], SignerInfo.prototype, "unsignedAttrs", void 0);
let SignerInfos = SignerInfos_1 = class SignerInfos extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, SignerInfos_1.prototype);
}
};
exports.SignerInfos = SignerInfos;
exports.SignerInfos = SignerInfos = SignerInfos_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Set, itemType: SignerInfo })
], SignerInfos);
+51
View File
@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyDerivationAlgorithmIdentifier = exports.MessageAuthenticationCodeAlgorithm = exports.ContentEncryptionAlgorithmIdentifier = exports.KeyEncryptionAlgorithmIdentifier = exports.SignatureAlgorithmIdentifier = exports.DigestAlgorithmIdentifier = exports.CMSVersion = void 0;
const tslib_1 = require("tslib");
const asn1_x509_1 = require("@peculiar/asn1-x509");
const asn1_schema_1 = require("@peculiar/asn1-schema");
var CMSVersion;
(function (CMSVersion) {
CMSVersion[CMSVersion["v0"] = 0] = "v0";
CMSVersion[CMSVersion["v1"] = 1] = "v1";
CMSVersion[CMSVersion["v2"] = 2] = "v2";
CMSVersion[CMSVersion["v3"] = 3] = "v3";
CMSVersion[CMSVersion["v4"] = 4] = "v4";
CMSVersion[CMSVersion["v5"] = 5] = "v5";
})(CMSVersion || (exports.CMSVersion = CMSVersion = {}));
let DigestAlgorithmIdentifier = class DigestAlgorithmIdentifier extends asn1_x509_1.AlgorithmIdentifier {
};
exports.DigestAlgorithmIdentifier = DigestAlgorithmIdentifier;
exports.DigestAlgorithmIdentifier = DigestAlgorithmIdentifier = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence })
], DigestAlgorithmIdentifier);
let SignatureAlgorithmIdentifier = class SignatureAlgorithmIdentifier extends asn1_x509_1.AlgorithmIdentifier {
};
exports.SignatureAlgorithmIdentifier = SignatureAlgorithmIdentifier;
exports.SignatureAlgorithmIdentifier = SignatureAlgorithmIdentifier = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence })
], SignatureAlgorithmIdentifier);
let KeyEncryptionAlgorithmIdentifier = class KeyEncryptionAlgorithmIdentifier extends asn1_x509_1.AlgorithmIdentifier {
};
exports.KeyEncryptionAlgorithmIdentifier = KeyEncryptionAlgorithmIdentifier;
exports.KeyEncryptionAlgorithmIdentifier = KeyEncryptionAlgorithmIdentifier = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence })
], KeyEncryptionAlgorithmIdentifier);
let ContentEncryptionAlgorithmIdentifier = class ContentEncryptionAlgorithmIdentifier extends asn1_x509_1.AlgorithmIdentifier {
};
exports.ContentEncryptionAlgorithmIdentifier = ContentEncryptionAlgorithmIdentifier;
exports.ContentEncryptionAlgorithmIdentifier = ContentEncryptionAlgorithmIdentifier = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence })
], ContentEncryptionAlgorithmIdentifier);
let MessageAuthenticationCodeAlgorithm = class MessageAuthenticationCodeAlgorithm extends asn1_x509_1.AlgorithmIdentifier {
};
exports.MessageAuthenticationCodeAlgorithm = MessageAuthenticationCodeAlgorithm;
exports.MessageAuthenticationCodeAlgorithm = MessageAuthenticationCodeAlgorithm = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence })
], MessageAuthenticationCodeAlgorithm);
let KeyDerivationAlgorithmIdentifier = class KeyDerivationAlgorithmIdentifier extends asn1_x509_1.AlgorithmIdentifier {
};
exports.KeyDerivationAlgorithmIdentifier = KeyDerivationAlgorithmIdentifier;
exports.KeyDerivationAlgorithmIdentifier = KeyDerivationAlgorithmIdentifier = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence })
], KeyDerivationAlgorithmIdentifier);
+15
View File
@@ -0,0 +1,15 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
export class Attribute {
constructor(params = {}) {
this.attrType = "";
this.attrValues = [];
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], Attribute.prototype, "attrType", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, repeated: "set" })
], Attribute.prototype, "attrValues", void 0);
@@ -0,0 +1,10 @@
import { __decorate } from "tslib";
import { AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { SignerInfo } from "../signer_info";
export const id_counterSignature = "1.2.840.113549.1.9.6";
let CounterSignature = class CounterSignature extends SignerInfo {
};
CounterSignature = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], CounterSignature);
export { CounterSignature };
+4
View File
@@ -0,0 +1,4 @@
export * from "./counter_signature";
export * from "./message_digest";
export * from "./signing_time";
export const id_contentType = "1.2.840.113549.1.9.3";
@@ -0,0 +1,4 @@
import { OctetString } from "@peculiar/asn1-schema";
export const id_messageDigest = "1.2.840.113549.1.9.4";
export class MessageDigest extends OctetString {
}
@@ -0,0 +1,10 @@
import { __decorate } from "tslib";
import { Time } from "@peculiar/asn1-x509";
import { AsnTypeTypes, AsnType } from "@peculiar/asn1-schema";
export const id_signingTime = "1.2.840.113549.1.9.5";
let SigningTime = class SigningTime extends Time {
};
SigningTime = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], SigningTime);
export { SigningTime };
+46
View File
@@ -0,0 +1,46 @@
var CertificateSet_1;
import { __decorate } from "tslib";
import { AsnType, AsnTypeTypes, AsnProp, AsnPropTypes, AsnArray } from "@peculiar/asn1-schema";
import { Certificate } from "@peculiar/asn1-x509";
import { AttributeCertificate } from "@peculiar/asn1-x509-attr";
export class OtherCertificateFormat {
constructor(params = {}) {
this.otherCertFormat = "";
this.otherCert = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], OtherCertificateFormat.prototype, "otherCertFormat", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any })
], OtherCertificateFormat.prototype, "otherCert", void 0);
let CertificateChoices = class CertificateChoices {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: Certificate })
], CertificateChoices.prototype, "certificate", void 0);
__decorate([
AsnProp({ type: AttributeCertificate, context: 2, implicit: true })
], CertificateChoices.prototype, "v2AttrCert", void 0);
__decorate([
AsnProp({ type: OtherCertificateFormat, context: 3, implicit: true })
], CertificateChoices.prototype, "other", void 0);
CertificateChoices = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], CertificateChoices);
export { CertificateChoices };
let CertificateSet = CertificateSet_1 = class CertificateSet extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, CertificateSet_1.prototype);
}
};
CertificateSet = CertificateSet_1 = __decorate([
AsnType({ type: AsnTypeTypes.Set, itemType: CertificateChoices })
], CertificateSet);
export { CertificateSet };
+15
View File
@@ -0,0 +1,15 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
export class ContentInfo {
constructor(params = {}) {
this.contentType = "";
this.content = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], ContentInfo.prototype, "contentType", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, context: 0 })
], ContentInfo.prototype, "content", void 0);
@@ -0,0 +1,29 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes, OctetString } from "@peculiar/asn1-schema";
let EncapsulatedContent = class EncapsulatedContent {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: OctetString })
], EncapsulatedContent.prototype, "single", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any })
], EncapsulatedContent.prototype, "any", void 0);
EncapsulatedContent = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], EncapsulatedContent);
export { EncapsulatedContent };
export class EncapsulatedContentInfo {
constructor(params = {}) {
this.eContentType = "";
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], EncapsulatedContentInfo.prototype, "eContentType", void 0);
__decorate([
AsnProp({ type: EncapsulatedContent, context: 0, optional: true })
], EncapsulatedContentInfo.prototype, "eContent", void 0);
+41
View File
@@ -0,0 +1,41 @@
import { __decorate } from "tslib";
import { AsnConstructedOctetStringConverter, AsnProp, AsnPropTypes, AsnType, AsnTypeTypes, OctetString, } from "@peculiar/asn1-schema";
import { ContentEncryptionAlgorithmIdentifier } from "./types";
let EncryptedContent = class EncryptedContent {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: OctetString, context: 0, implicit: true, optional: true })
], EncryptedContent.prototype, "value", void 0);
__decorate([
AsnProp({
type: OctetString,
converter: AsnConstructedOctetStringConverter,
context: 0,
implicit: true,
optional: true,
repeated: "sequence",
})
], EncryptedContent.prototype, "constructedValue", void 0);
EncryptedContent = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], EncryptedContent);
export { EncryptedContent };
export class EncryptedContentInfo {
constructor(params = {}) {
this.contentType = "";
this.contentEncryptionAlgorithm = new ContentEncryptionAlgorithmIdentifier();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], EncryptedContentInfo.prototype, "contentType", void 0);
__decorate([
AsnProp({ type: ContentEncryptionAlgorithmIdentifier })
], EncryptedContentInfo.prototype, "contentEncryptionAlgorithm", void 0);
__decorate([
AsnProp({ type: EncryptedContent, optional: true })
], EncryptedContentInfo.prototype, "encryptedContent", void 0);
+41
View File
@@ -0,0 +1,41 @@
var UnprotectedAttributes_1;
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnArray, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { CMSVersion } from "./types";
import { Attribute } from "./attribute";
import { RecipientInfos } from "./recipient_infos";
import { OriginatorInfo } from "./originator_info";
import { EncryptedContentInfo } from "./encrypted_content_info";
let UnprotectedAttributes = UnprotectedAttributes_1 = class UnprotectedAttributes extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, UnprotectedAttributes_1.prototype);
}
};
UnprotectedAttributes = UnprotectedAttributes_1 = __decorate([
AsnType({ type: AsnTypeTypes.Set, itemType: Attribute })
], UnprotectedAttributes);
export { UnprotectedAttributes };
export class EnvelopedData {
constructor(params = {}) {
this.version = CMSVersion.v0;
this.recipientInfos = new RecipientInfos();
this.encryptedContentInfo = new EncryptedContentInfo();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], EnvelopedData.prototype, "version", void 0);
__decorate([
AsnProp({ type: OriginatorInfo, context: 0, implicit: true, optional: true })
], EnvelopedData.prototype, "originatorInfo", void 0);
__decorate([
AsnProp({ type: RecipientInfos })
], EnvelopedData.prototype, "recipientInfos", void 0);
__decorate([
AsnProp({ type: EncryptedContentInfo })
], EnvelopedData.prototype, "encryptedContentInfo", void 0);
__decorate([
AsnProp({ type: UnprotectedAttributes, context: 1, implicit: true, optional: true })
], EnvelopedData.prototype, "unprotectedAttrs", void 0);
+21
View File
@@ -0,0 +1,21 @@
export * from "./attributes";
export * from "./attribute";
export * from "./certificate_choices";
export * from "./content_info";
export * from "./encapsulated_content_info";
export * from "./encrypted_content_info";
export * from "./enveloped_data";
export * from "./issuer_and_serial_number";
export * from "./kek_recipient_info";
export * from "./key_agree_recipient_info";
export * from "./key_trans_recipient_info";
export * from "./object_identifiers";
export * from "./originator_info";
export * from "./password_recipient_info";
export * from "./recipient_info";
export * from "./recipient_infos";
export * from "./revocation_info_choice";
export * from "./signed_data";
export * from "./signer_identifier";
export * from "./signer_info";
export * from "./types";
@@ -0,0 +1,16 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnIntegerArrayBufferConverter } from "@peculiar/asn1-schema";
import { Name } from "@peculiar/asn1-x509";
export class IssuerAndSerialNumber {
constructor(params = {}) {
this.issuer = new Name();
this.serialNumber = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: Name })
], IssuerAndSerialNumber.prototype, "issuer", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter })
], IssuerAndSerialNumber.prototype, "serialNumber", void 0);
+40
View File
@@ -0,0 +1,40 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, OctetString } from "@peculiar/asn1-schema";
import { OtherKeyAttribute } from "./other_key_attribute";
import { CMSVersion, KeyEncryptionAlgorithmIdentifier } from "./types";
export class KEKIdentifier {
constructor(params = {}) {
this.keyIdentifier = new OctetString();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: OctetString })
], KEKIdentifier.prototype, "keyIdentifier", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.GeneralizedTime, optional: true })
], KEKIdentifier.prototype, "date", void 0);
__decorate([
AsnProp({ type: OtherKeyAttribute, optional: true })
], KEKIdentifier.prototype, "other", void 0);
export class KEKRecipientInfo {
constructor(params = {}) {
this.version = CMSVersion.v4;
this.kekid = new KEKIdentifier();
this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
this.encryptedKey = new OctetString();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], KEKRecipientInfo.prototype, "version", void 0);
__decorate([
AsnProp({ type: KEKIdentifier })
], KEKRecipientInfo.prototype, "kekid", void 0);
__decorate([
AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
], KEKRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
__decorate([
AsnProp({ type: OctetString })
], KEKRecipientInfo.prototype, "encryptedKey", void 0);
@@ -0,0 +1,115 @@
var RecipientEncryptedKeys_1;
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnArray, AsnType, AsnTypeTypes, OctetString, } from "@peculiar/asn1-schema";
import { CMSVersion, KeyEncryptionAlgorithmIdentifier } from "./types";
import { IssuerAndSerialNumber } from "./issuer_and_serial_number";
import { AlgorithmIdentifier, SubjectKeyIdentifier } from "@peculiar/asn1-x509";
import { OtherKeyAttribute } from "./other_key_attribute";
export class RecipientKeyIdentifier {
constructor(params = {}) {
this.subjectKeyIdentifier = new SubjectKeyIdentifier();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: SubjectKeyIdentifier })
], RecipientKeyIdentifier.prototype, "subjectKeyIdentifier", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.GeneralizedTime, optional: true })
], RecipientKeyIdentifier.prototype, "date", void 0);
__decorate([
AsnProp({ type: OtherKeyAttribute, optional: true })
], RecipientKeyIdentifier.prototype, "other", void 0);
let KeyAgreeRecipientIdentifier = class KeyAgreeRecipientIdentifier {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: RecipientKeyIdentifier, context: 0, implicit: true, optional: true })
], KeyAgreeRecipientIdentifier.prototype, "rKeyId", void 0);
__decorate([
AsnProp({ type: IssuerAndSerialNumber, optional: true })
], KeyAgreeRecipientIdentifier.prototype, "issuerAndSerialNumber", void 0);
KeyAgreeRecipientIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], KeyAgreeRecipientIdentifier);
export { KeyAgreeRecipientIdentifier };
export class RecipientEncryptedKey {
constructor(params = {}) {
this.rid = new KeyAgreeRecipientIdentifier();
this.encryptedKey = new OctetString();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: KeyAgreeRecipientIdentifier })
], RecipientEncryptedKey.prototype, "rid", void 0);
__decorate([
AsnProp({ type: OctetString })
], RecipientEncryptedKey.prototype, "encryptedKey", void 0);
let RecipientEncryptedKeys = RecipientEncryptedKeys_1 = class RecipientEncryptedKeys extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, RecipientEncryptedKeys_1.prototype);
}
};
RecipientEncryptedKeys = RecipientEncryptedKeys_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: RecipientEncryptedKey })
], RecipientEncryptedKeys);
export { RecipientEncryptedKeys };
export class OriginatorPublicKey {
constructor(params = {}) {
this.algorithm = new AlgorithmIdentifier();
this.publicKey = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AlgorithmIdentifier })
], OriginatorPublicKey.prototype, "algorithm", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.BitString })
], OriginatorPublicKey.prototype, "publicKey", void 0);
let OriginatorIdentifierOrKey = class OriginatorIdentifierOrKey {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true, optional: true })
], OriginatorIdentifierOrKey.prototype, "subjectKeyIdentifier", void 0);
__decorate([
AsnProp({ type: OriginatorPublicKey, context: 1, implicit: true, optional: true })
], OriginatorIdentifierOrKey.prototype, "originatorKey", void 0);
__decorate([
AsnProp({ type: IssuerAndSerialNumber, optional: true })
], OriginatorIdentifierOrKey.prototype, "issuerAndSerialNumber", void 0);
OriginatorIdentifierOrKey = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], OriginatorIdentifierOrKey);
export { OriginatorIdentifierOrKey };
export class KeyAgreeRecipientInfo {
constructor(params = {}) {
this.version = CMSVersion.v3;
this.originator = new OriginatorIdentifierOrKey();
this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
this.recipientEncryptedKeys = new RecipientEncryptedKeys();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], KeyAgreeRecipientInfo.prototype, "version", void 0);
__decorate([
AsnProp({ type: OriginatorIdentifierOrKey, context: 0 })
], KeyAgreeRecipientInfo.prototype, "originator", void 0);
__decorate([
AsnProp({ type: OctetString, context: 1, optional: true })
], KeyAgreeRecipientInfo.prototype, "ukm", void 0);
__decorate([
AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
], KeyAgreeRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
__decorate([
AsnProp({ type: RecipientEncryptedKeys })
], KeyAgreeRecipientInfo.prototype, "recipientEncryptedKeys", void 0);
@@ -0,0 +1,41 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes, OctetString } from "@peculiar/asn1-schema";
import { CMSVersion, KeyEncryptionAlgorithmIdentifier } from "./types";
import { IssuerAndSerialNumber } from "./issuer_and_serial_number";
import { SubjectKeyIdentifier } from "@peculiar/asn1-x509";
let RecipientIdentifier = class RecipientIdentifier {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true })
], RecipientIdentifier.prototype, "subjectKeyIdentifier", void 0);
__decorate([
AsnProp({ type: IssuerAndSerialNumber })
], RecipientIdentifier.prototype, "issuerAndSerialNumber", void 0);
RecipientIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], RecipientIdentifier);
export { RecipientIdentifier };
export class KeyTransRecipientInfo {
constructor(params = {}) {
this.version = CMSVersion.v0;
this.rid = new RecipientIdentifier();
this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
this.encryptedKey = new OctetString();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], KeyTransRecipientInfo.prototype, "version", void 0);
__decorate([
AsnProp({ type: RecipientIdentifier })
], KeyTransRecipientInfo.prototype, "rid", void 0);
__decorate([
AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
], KeyTransRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
__decorate([
AsnProp({ type: OctetString })
], KeyTransRecipientInfo.prototype, "encryptedKey", void 0);
+7
View File
@@ -0,0 +1,7 @@
export const id_ct_contentInfo = "1.2.840.113549.1.9.16.1.6";
export const id_data = "1.2.840.113549.1.7.1";
export const id_signedData = "1.2.840.113549.1.7.2";
export const id_envelopedData = "1.2.840.113549.1.7.3";
export const id_digestedData = "1.2.840.113549.1.7.5";
export const id_encryptedData = "1.2.840.113549.1.7.6";
export const id_authData = "1.2.840.113549.1.9.16.1.2";
+15
View File
@@ -0,0 +1,15 @@
import { __decorate } from "tslib";
import { AsnProp } from "@peculiar/asn1-schema";
import { CertificateSet } from "./certificate_choices";
import { RevocationInfoChoices } from "./revocation_info_choice";
export class OriginatorInfo {
constructor(params = {}) {
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: CertificateSet, context: 0, implicit: true, optional: true })
], OriginatorInfo.prototype, "certs", void 0);
__decorate([
AsnProp({ type: RevocationInfoChoices, context: 1, implicit: true, optional: true })
], OriginatorInfo.prototype, "crls", void 0);
+14
View File
@@ -0,0 +1,14 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
export class OtherKeyAttribute {
constructor(params = {}) {
this.keyAttrId = "";
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], OtherKeyAttribute.prototype, "keyAttrId", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, optional: true })
], OtherKeyAttribute.prototype, "keyAttr", void 0);
@@ -0,0 +1,23 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, OctetString } from "@peculiar/asn1-schema";
import { CMSVersion, KeyDerivationAlgorithmIdentifier, KeyEncryptionAlgorithmIdentifier, } from "./types";
export class PasswordRecipientInfo {
constructor(params = {}) {
this.version = CMSVersion.v0;
this.keyEncryptionAlgorithm = new KeyEncryptionAlgorithmIdentifier();
this.encryptedKey = new OctetString();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], PasswordRecipientInfo.prototype, "version", void 0);
__decorate([
AsnProp({ type: KeyDerivationAlgorithmIdentifier, context: 0, optional: true })
], PasswordRecipientInfo.prototype, "keyDerivationAlgorithm", void 0);
__decorate([
AsnProp({ type: KeyEncryptionAlgorithmIdentifier })
], PasswordRecipientInfo.prototype, "keyEncryptionAlgorithm", void 0);
__decorate([
AsnProp({ type: OctetString })
], PasswordRecipientInfo.prototype, "encryptedKey", void 0);
+43
View File
@@ -0,0 +1,43 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { KeyAgreeRecipientInfo } from "./key_agree_recipient_info";
import { KeyTransRecipientInfo } from "./key_trans_recipient_info";
import { KEKRecipientInfo } from "./kek_recipient_info";
import { PasswordRecipientInfo } from "./password_recipient_info";
export class OtherRecipientInfo {
constructor(params = {}) {
this.oriType = "";
this.oriValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], OtherRecipientInfo.prototype, "oriType", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any })
], OtherRecipientInfo.prototype, "oriValue", void 0);
let RecipientInfo = class RecipientInfo {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: KeyTransRecipientInfo, optional: true })
], RecipientInfo.prototype, "ktri", void 0);
__decorate([
AsnProp({ type: KeyAgreeRecipientInfo, context: 1, implicit: true, optional: true })
], RecipientInfo.prototype, "kari", void 0);
__decorate([
AsnProp({ type: KEKRecipientInfo, context: 2, implicit: true, optional: true })
], RecipientInfo.prototype, "kekri", void 0);
__decorate([
AsnProp({ type: PasswordRecipientInfo, context: 3, implicit: true, optional: true })
], RecipientInfo.prototype, "pwri", void 0);
__decorate([
AsnProp({ type: OtherRecipientInfo, context: 4, implicit: true, optional: true })
], RecipientInfo.prototype, "ori", void 0);
RecipientInfo = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], RecipientInfo);
export { RecipientInfo };
+14
View File
@@ -0,0 +1,14 @@
var RecipientInfos_1;
import { __decorate } from "tslib";
import { AsnArray, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { RecipientInfo } from "./recipient_info";
let RecipientInfos = RecipientInfos_1 = class RecipientInfos extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, RecipientInfos_1.prototype);
}
};
RecipientInfos = RecipientInfos_1 = __decorate([
AsnType({ type: AsnTypeTypes.Set, itemType: RecipientInfo })
], RecipientInfos);
export { RecipientInfos };
+43
View File
@@ -0,0 +1,43 @@
var RevocationInfoChoices_1;
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes, AsnArray } from "@peculiar/asn1-schema";
import { id_pkix } from "@peculiar/asn1-x509";
export const id_ri = `${id_pkix}.16`;
export const id_ri_ocsp_response = `${id_ri}.2`;
export const id_ri_scvp = `${id_ri}.4`;
export class OtherRevocationInfoFormat {
constructor(params = {}) {
this.otherRevInfoFormat = "";
this.otherRevInfo = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], OtherRevocationInfoFormat.prototype, "otherRevInfoFormat", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any })
], OtherRevocationInfoFormat.prototype, "otherRevInfo", void 0);
let RevocationInfoChoice = class RevocationInfoChoice {
constructor(params = {}) {
this.other = new OtherRevocationInfoFormat();
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: OtherRevocationInfoFormat, context: 1, implicit: true })
], RevocationInfoChoice.prototype, "other", void 0);
RevocationInfoChoice = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], RevocationInfoChoice);
export { RevocationInfoChoice };
let RevocationInfoChoices = RevocationInfoChoices_1 = class RevocationInfoChoices extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, RevocationInfoChoices_1.prototype);
}
};
RevocationInfoChoices = RevocationInfoChoices_1 = __decorate([
AsnType({ type: AsnTypeTypes.Set, itemType: RevocationInfoChoice })
], RevocationInfoChoices);
export { RevocationInfoChoices };
+45
View File
@@ -0,0 +1,45 @@
var DigestAlgorithmIdentifiers_1;
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnArray, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { CertificateSet } from "./certificate_choices";
import { CMSVersion, DigestAlgorithmIdentifier } from "./types";
import { EncapsulatedContentInfo } from "./encapsulated_content_info";
import { RevocationInfoChoices } from "./revocation_info_choice";
import { SignerInfos } from "./signer_info";
let DigestAlgorithmIdentifiers = DigestAlgorithmIdentifiers_1 = class DigestAlgorithmIdentifiers extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, DigestAlgorithmIdentifiers_1.prototype);
}
};
DigestAlgorithmIdentifiers = DigestAlgorithmIdentifiers_1 = __decorate([
AsnType({ type: AsnTypeTypes.Set, itemType: DigestAlgorithmIdentifier })
], DigestAlgorithmIdentifiers);
export { DigestAlgorithmIdentifiers };
export class SignedData {
constructor(params = {}) {
this.version = CMSVersion.v0;
this.digestAlgorithms = new DigestAlgorithmIdentifiers();
this.encapContentInfo = new EncapsulatedContentInfo();
this.signerInfos = new SignerInfos();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], SignedData.prototype, "version", void 0);
__decorate([
AsnProp({ type: DigestAlgorithmIdentifiers })
], SignedData.prototype, "digestAlgorithms", void 0);
__decorate([
AsnProp({ type: EncapsulatedContentInfo })
], SignedData.prototype, "encapContentInfo", void 0);
__decorate([
AsnProp({ type: CertificateSet, context: 0, implicit: true, optional: true })
], SignedData.prototype, "certificates", void 0);
__decorate([
AsnProp({ type: RevocationInfoChoices, context: 1, implicit: true, optional: true })
], SignedData.prototype, "crls", void 0);
__decorate([
AsnProp({ type: SignerInfos })
], SignedData.prototype, "signerInfos", void 0);
+19
View File
@@ -0,0 +1,19 @@
import { __decorate } from "tslib";
import { AsnProp, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { IssuerAndSerialNumber } from "./issuer_and_serial_number";
import { SubjectKeyIdentifier } from "@peculiar/asn1-x509";
let SignerIdentifier = class SignerIdentifier {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: SubjectKeyIdentifier, context: 0, implicit: true })
], SignerIdentifier.prototype, "subjectKeyIdentifier", void 0);
__decorate([
AsnProp({ type: IssuerAndSerialNumber })
], SignerIdentifier.prototype, "issuerAndSerialNumber", void 0);
SignerIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], SignerIdentifier);
export { SignerIdentifier };
+54
View File
@@ -0,0 +1,54 @@
var SignerInfos_1;
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnArray, AsnType, AsnTypeTypes, OctetString, } from "@peculiar/asn1-schema";
import { SignerIdentifier } from "./signer_identifier";
import { CMSVersion, SignatureAlgorithmIdentifier, DigestAlgorithmIdentifier } from "./types";
import { Attribute } from "./attribute";
export class SignerInfo {
constructor(params = {}) {
this.version = CMSVersion.v0;
this.sid = new SignerIdentifier();
this.digestAlgorithm = new DigestAlgorithmIdentifier();
this.signatureAlgorithm = new SignatureAlgorithmIdentifier();
this.signature = new OctetString();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], SignerInfo.prototype, "version", void 0);
__decorate([
AsnProp({ type: SignerIdentifier })
], SignerInfo.prototype, "sid", void 0);
__decorate([
AsnProp({ type: DigestAlgorithmIdentifier })
], SignerInfo.prototype, "digestAlgorithm", void 0);
__decorate([
AsnProp({
type: Attribute,
repeated: "set",
context: 0,
implicit: true,
optional: true,
raw: true,
})
], SignerInfo.prototype, "signedAttrs", void 0);
__decorate([
AsnProp({ type: SignatureAlgorithmIdentifier })
], SignerInfo.prototype, "signatureAlgorithm", void 0);
__decorate([
AsnProp({ type: OctetString })
], SignerInfo.prototype, "signature", void 0);
__decorate([
AsnProp({ type: Attribute, repeated: "set", context: 1, implicit: true, optional: true })
], SignerInfo.prototype, "unsignedAttrs", void 0);
let SignerInfos = SignerInfos_1 = class SignerInfos extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, SignerInfos_1.prototype);
}
};
SignerInfos = SignerInfos_1 = __decorate([
AsnType({ type: AsnTypeTypes.Set, itemType: SignerInfo })
], SignerInfos);
export { SignerInfos };
+48
View File
@@ -0,0 +1,48 @@
import { __decorate } from "tslib";
import { AlgorithmIdentifier } from "@peculiar/asn1-x509";
import { AsnTypeTypes, AsnType } from "@peculiar/asn1-schema";
export var CMSVersion;
(function (CMSVersion) {
CMSVersion[CMSVersion["v0"] = 0] = "v0";
CMSVersion[CMSVersion["v1"] = 1] = "v1";
CMSVersion[CMSVersion["v2"] = 2] = "v2";
CMSVersion[CMSVersion["v3"] = 3] = "v3";
CMSVersion[CMSVersion["v4"] = 4] = "v4";
CMSVersion[CMSVersion["v5"] = 5] = "v5";
})(CMSVersion || (CMSVersion = {}));
let DigestAlgorithmIdentifier = class DigestAlgorithmIdentifier extends AlgorithmIdentifier {
};
DigestAlgorithmIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], DigestAlgorithmIdentifier);
export { DigestAlgorithmIdentifier };
let SignatureAlgorithmIdentifier = class SignatureAlgorithmIdentifier extends AlgorithmIdentifier {
};
SignatureAlgorithmIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], SignatureAlgorithmIdentifier);
export { SignatureAlgorithmIdentifier };
let KeyEncryptionAlgorithmIdentifier = class KeyEncryptionAlgorithmIdentifier extends AlgorithmIdentifier {
};
KeyEncryptionAlgorithmIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], KeyEncryptionAlgorithmIdentifier);
export { KeyEncryptionAlgorithmIdentifier };
let ContentEncryptionAlgorithmIdentifier = class ContentEncryptionAlgorithmIdentifier extends AlgorithmIdentifier {
};
ContentEncryptionAlgorithmIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], ContentEncryptionAlgorithmIdentifier);
export { ContentEncryptionAlgorithmIdentifier };
let MessageAuthenticationCodeAlgorithm = class MessageAuthenticationCodeAlgorithm extends AlgorithmIdentifier {
};
MessageAuthenticationCodeAlgorithm = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], MessageAuthenticationCodeAlgorithm);
export { MessageAuthenticationCodeAlgorithm };
let KeyDerivationAlgorithmIdentifier = class KeyDerivationAlgorithmIdentifier extends AlgorithmIdentifier {
};
KeyDerivationAlgorithmIdentifier = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], KeyDerivationAlgorithmIdentifier);
export { KeyDerivationAlgorithmIdentifier };
+18
View File
@@ -0,0 +1,18 @@
/**
* ```asn
* AttributeValue ::= ANY
* ```
*/
export type AttributeValue = ArrayBuffer;
/**
* ```asn
* Attribute ::= SEQUENCE {
* attrType OBJECT IDENTIFIER,
* attrValues SET OF AttributeValue }
* ```
*/
export declare class Attribute {
attrType: string;
attrValues: AttributeValue[];
constructor(params?: Partial<Attribute>);
}
@@ -0,0 +1,15 @@
import { SignerInfo } from "../signer_info";
/**
* ```asn
* id-countersignature OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs9(9) 6 }
* ```
*/
export declare const id_counterSignature = "1.2.840.113549.1.9.6";
/**
* ```asn
* SigningTime ::= Time
* ```
*/
export declare class CounterSignature extends SignerInfo {
}
+10
View File
@@ -0,0 +1,10 @@
export * from "./counter_signature";
export * from "./message_digest";
export * from "./signing_time";
/**
* ```asn
* id-contentType OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs9(9) 3 }
* ```
*/
export declare const id_contentType = "1.2.840.113549.1.9.3";
@@ -0,0 +1,15 @@
import { OctetString } from "@peculiar/asn1-schema";
/**
* ```asn
* id-messageDigest OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs9(9) 4 }
* ```
*/
export declare const id_messageDigest = "1.2.840.113549.1.9.4";
/**
* ```asn
* MessageDigest ::= OCTET STRING
* ```
*/
export declare class MessageDigest extends OctetString {
}
@@ -0,0 +1,15 @@
import { Time } from "@peculiar/asn1-x509";
/**
* ```asn
* id-signingTime OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs9(9) 5 }
* ```
*/
export declare const id_signingTime = "1.2.840.113549.1.9.5";
/**
* ```asn
* SigningTime ::= Time
* ```
*/
export declare class SigningTime extends Time {
}
+39
View File
@@ -0,0 +1,39 @@
import { AsnArray } from "@peculiar/asn1-schema";
import { Certificate } from "@peculiar/asn1-x509";
import { AttributeCertificate } from "@peculiar/asn1-x509-attr";
/**
* ```asn
* OtherCertificateFormat ::= SEQUENCE {
* otherCertFormat OBJECT IDENTIFIER,
* otherCert ANY DEFINED BY otherCertFormat }
* ```
*/
export declare class OtherCertificateFormat {
otherCertFormat: string;
otherCert: ArrayBuffer;
constructor(params?: Partial<OtherCertificateFormat>);
}
/**
* ```asn
* CertificateChoices ::= CHOICE {
* certificate Certificate,
* extendedCertificate [0] IMPLICIT ExtendedCertificate, -- Obsolete
* v1AttrCert [1] IMPLICIT AttributeCertificateV1, -- Obsolete
* v2AttrCert [2] IMPLICIT AttributeCertificateV2,
* other [3] IMPLICIT OtherCertificateFormat }
* ```
*/
export declare class CertificateChoices {
certificate?: Certificate;
v2AttrCert?: AttributeCertificate;
other?: OtherCertificateFormat;
constructor(params?: Partial<CertificateChoices>);
}
/**
* ```asn
* CertificateSet ::= SET OF CertificateChoices
* ```
*/
export declare class CertificateSet extends AsnArray<CertificateChoices> {
constructor(items?: CertificateChoices[]);
}
+13
View File
@@ -0,0 +1,13 @@
import { ContentType } from "./types";
/**
* ```asn
* ContentInfo ::= SEQUENCE {
* contentType ContentType,
* content [0] EXPLICIT ANY DEFINED BY contentType }
* ```
*/
export declare class ContentInfo {
contentType: ContentType;
content: ArrayBuffer;
constructor(params?: Partial<ContentInfo>);
}
@@ -0,0 +1,19 @@
import { OctetString } from "@peculiar/asn1-schema";
import { ContentType } from "./types";
export declare class EncapsulatedContent {
single?: OctetString;
any?: ArrayBuffer;
constructor(params?: Partial<EncapsulatedContent>);
}
/**
* ```asn
* EncapsulatedContentInfo ::= SEQUENCE {
* eContentType ContentType,
* eContent [0] EXPLICIT OCTET STRING OPTIONAL }
* ```
*/
export declare class EncapsulatedContentInfo {
eContentType: ContentType;
eContent?: EncapsulatedContent;
constructor(params?: Partial<EncapsulatedContentInfo>);
}
@@ -0,0 +1,26 @@
import { OctetString } from "@peculiar/asn1-schema";
import { ContentType, ContentEncryptionAlgorithmIdentifier } from "./types";
/**
* ```asn
* EncryptedContent ::= OCTET STRING
* ```
*/
export declare class EncryptedContent {
value?: OctetString;
constructedValue?: OctetString[];
constructor(params?: Partial<EncryptedContent>);
}
/**
* ```asn
* EncryptedContentInfo ::= SEQUENCE {
* contentType ContentType,
* contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
* encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL }
* ```
*/
export declare class EncryptedContentInfo {
contentType: ContentType;
contentEncryptionAlgorithm: ContentEncryptionAlgorithmIdentifier;
encryptedContent?: EncryptedContent;
constructor(params?: Partial<EncryptedContentInfo>);
}
+32
View File
@@ -0,0 +1,32 @@
import { AsnArray } from "@peculiar/asn1-schema";
import { CMSVersion } from "./types";
import { Attribute } from "./attribute";
import { RecipientInfos } from "./recipient_infos";
import { OriginatorInfo } from "./originator_info";
import { EncryptedContentInfo } from "./encrypted_content_info";
/**
* ```asn
* UnprotectedAttributes ::= SET SIZE (1..MAX) OF Attribute
* ```
*/
export declare class UnprotectedAttributes extends AsnArray<Attribute> {
constructor(items?: Attribute[]);
}
/**
* ```asn
* EnvelopedData ::= SEQUENCE {
* version CMSVersion,
* originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
* recipientInfos RecipientInfos,
* encryptedContentInfo EncryptedContentInfo,
* unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }
* ```
*/
export declare class EnvelopedData {
version: CMSVersion;
originatorInfo?: OriginatorInfo;
recipientInfos: RecipientInfos;
encryptedContentInfo: EncryptedContentInfo;
unprotectedAttrs?: UnprotectedAttributes;
constructor(params?: Partial<EnvelopedData>);
}
+21
View File
@@ -0,0 +1,21 @@
export * from "./attributes";
export * from "./attribute";
export * from "./certificate_choices";
export * from "./content_info";
export * from "./encapsulated_content_info";
export * from "./encrypted_content_info";
export * from "./enveloped_data";
export * from "./issuer_and_serial_number";
export * from "./kek_recipient_info";
export * from "./key_agree_recipient_info";
export * from "./key_trans_recipient_info";
export * from "./object_identifiers";
export * from "./originator_info";
export * from "./password_recipient_info";
export * from "./recipient_info";
export * from "./recipient_infos";
export * from "./revocation_info_choice";
export * from "./signed_data";
export * from "./signer_identifier";
export * from "./signer_info";
export * from "./types";
@@ -0,0 +1,19 @@
import { Name } from "@peculiar/asn1-x509";
/**
* ```asn
* IssuerAndSerialNumber ::= SEQUENCE {
* issuer Name,
* serialNumber CertificateSerialNumber }
* ```
*/
export declare class IssuerAndSerialNumber {
issuer: Name;
serialNumber: ArrayBuffer;
constructor(params?: Partial<IssuerAndSerialNumber>);
}
/**
* ```asn
* CertificateSerialNumber ::= INTEGER
* ```
*/
export type CertificateSerialNumber = ArrayBuffer;
+33
View File
@@ -0,0 +1,33 @@
import { OctetString } from "@peculiar/asn1-schema";
import { OtherKeyAttribute } from "./other_key_attribute";
import { CMSVersion, EncryptedKey, KeyEncryptionAlgorithmIdentifier } from "./types";
/**
* ```asn
* KEKIdentifier ::= SEQUENCE {
* keyIdentifier OCTET STRING,
* date GeneralizedTime OPTIONAL,
* other OtherKeyAttribute OPTIONAL }
* ```
*/
export declare class KEKIdentifier {
keyIdentifier: OctetString;
date?: Date;
other?: OtherKeyAttribute;
constructor(params?: Partial<KEKIdentifier>);
}
/**
* ```asn
* KEKRecipientInfo ::= SEQUENCE {
* version CMSVersion, -- always set to 4
* kekid KEKIdentifier,
* keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
* encryptedKey EncryptedKey }
* ```
*/
export declare class KEKRecipientInfo {
version: CMSVersion;
kekid: KEKIdentifier;
keyEncryptionAlgorithm: KeyEncryptionAlgorithmIdentifier;
encryptedKey: EncryptedKey;
constructor(params?: Partial<KEKRecipientInfo>);
}
@@ -0,0 +1,101 @@
import { AsnArray, OctetString } from "@peculiar/asn1-schema";
import { CMSVersion, KeyEncryptionAlgorithmIdentifier, EncryptedKey } from "./types";
import { IssuerAndSerialNumber } from "./issuer_and_serial_number";
import { AlgorithmIdentifier, SubjectKeyIdentifier } from "@peculiar/asn1-x509";
import { OtherKeyAttribute } from "./other_key_attribute";
/**
* ```asn
* UserKeyingMaterial ::= OCTET STRING
* ```
*/
export type UserKeyingMaterial = OctetString;
/**
* ```asn
* RecipientKeyIdentifier ::= SEQUENCE {
* subjectKeyIdentifier SubjectKeyIdentifier,
* date GeneralizedTime OPTIONAL,
* other OtherKeyAttribute OPTIONAL }
* ```
*/
export declare class RecipientKeyIdentifier {
subjectKeyIdentifier: SubjectKeyIdentifier;
date?: Date;
other?: OtherKeyAttribute;
constructor(params?: Partial<RecipientKeyIdentifier>);
}
/**
* ```asn
* KeyAgreeRecipientIdentifier ::= CHOICE {
* issuerAndSerialNumber IssuerAndSerialNumber,
* rKeyId [0] IMPLICIT RecipientKeyIdentifier }
* ```
*/
export declare class KeyAgreeRecipientIdentifier {
rKeyId?: RecipientKeyIdentifier;
issuerAndSerialNumber?: IssuerAndSerialNumber;
constructor(params?: Partial<KeyAgreeRecipientIdentifier>);
}
/**
* ```asn
* RecipientEncryptedKey ::= SEQUENCE {
* rid KeyAgreeRecipientIdentifier,
* encryptedKey EncryptedKey }
* ```
*/
export declare class RecipientEncryptedKey {
rid: KeyAgreeRecipientIdentifier;
encryptedKey: EncryptedKey;
constructor(params?: Partial<RecipientEncryptedKey>);
}
/**
* ```asn
* RecipientEncryptedKeys ::= SEQUENCE OF RecipientEncryptedKey
* ```
*/
export declare class RecipientEncryptedKeys extends AsnArray<RecipientEncryptedKey> {
constructor(items?: RecipientEncryptedKey[]);
}
/**
* ```asn
* OriginatorPublicKey ::= SEQUENCE {
* algorithm AlgorithmIdentifier,
* publicKey BIT STRING }
* ```
*/
export declare class OriginatorPublicKey {
algorithm: AlgorithmIdentifier;
publicKey: ArrayBuffer;
constructor(params?: Partial<OriginatorPublicKey>);
}
/**
* ```asn
* OriginatorIdentifierOrKey ::= CHOICE {
* issuerAndSerialNumber IssuerAndSerialNumber,
* subjectKeyIdentifier [0] SubjectKeyIdentifier,
* originatorKey [1] OriginatorPublicKey }
* ```
*/
export declare class OriginatorIdentifierOrKey {
subjectKeyIdentifier?: SubjectKeyIdentifier;
originatorKey?: OriginatorPublicKey;
issuerAndSerialNumber?: IssuerAndSerialNumber;
constructor(params?: Partial<OriginatorIdentifierOrKey>);
}
/**
* ```asn
* KeyAgreeRecipientInfo ::= SEQUENCE {
* version CMSVersion, -- always set to 3
* originator [0] EXPLICIT OriginatorIdentifierOrKey,
* ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
* keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
* recipientEncryptedKeys RecipientEncryptedKeys }
* ```
*/
export declare class KeyAgreeRecipientInfo {
version: CMSVersion;
originator: OriginatorIdentifierOrKey;
ukm?: UserKeyingMaterial;
keyEncryptionAlgorithm: KeyEncryptionAlgorithmIdentifier;
recipientEncryptedKeys: RecipientEncryptedKeys;
constructor(params?: Partial<KeyAgreeRecipientInfo>);
}
@@ -0,0 +1,31 @@
import { CMSVersion, KeyEncryptionAlgorithmIdentifier, EncryptedKey } from "./types";
import { IssuerAndSerialNumber } from "./issuer_and_serial_number";
import { SubjectKeyIdentifier } from "@peculiar/asn1-x509";
/**
* ```asn
* RecipientIdentifier ::= CHOICE {
* issuerAndSerialNumber IssuerAndSerialNumber,
* subjectKeyIdentifier [0] SubjectKeyIdentifier }
* ```
*/
export declare class RecipientIdentifier {
subjectKeyIdentifier?: SubjectKeyIdentifier;
issuerAndSerialNumber?: IssuerAndSerialNumber;
constructor(params?: Partial<RecipientIdentifier>);
}
/**
* ```asn
* KeyTransRecipientInfo ::= SEQUENCE {
* version CMSVersion, -- always set to 0 or 2
* rid RecipientIdentifier,
* keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
* encryptedKey EncryptedKey }
* ```
*/
export declare class KeyTransRecipientInfo {
version: CMSVersion;
rid: RecipientIdentifier;
keyEncryptionAlgorithm: KeyEncryptionAlgorithmIdentifier;
encryptedKey: EncryptedKey;
constructor(params?: Partial<KeyTransRecipientInfo>);
}
+49
View File
@@ -0,0 +1,49 @@
/**
* ```asn
* id-ct-contentInfo OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) ct(1) 6 }
* ```
*/
export declare const id_ct_contentInfo = "1.2.840.113549.1.9.16.1.6";
/**
* ```asn
* id-data OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 1 }
* ```
*/
export declare const id_data = "1.2.840.113549.1.7.1";
/**
* ```asn
* id-signedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 }
* ```
*/
export declare const id_signedData = "1.2.840.113549.1.7.2";
/**
* ```asn
* id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 }
* ```
*/
export declare const id_envelopedData = "1.2.840.113549.1.7.3";
/**
* ```asn
* id-digestedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 5 }
* ```
*/
export declare const id_digestedData = "1.2.840.113549.1.7.5";
/**
* ```asn
* id-encryptedData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs7(7) 6 }
* ```
*/
export declare const id_encryptedData = "1.2.840.113549.1.7.6";
/**
* ```asn
* id-ct-authData OBJECT IDENTIFIER ::= { iso(1) member-body(2)
* us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) ct(1) 2 }
* ```
*/
export declare const id_authData = "1.2.840.113549.1.9.16.1.2";
+14
View File
@@ -0,0 +1,14 @@
import { CertificateSet } from "./certificate_choices";
import { RevocationInfoChoices } from "./revocation_info_choice";
/**
* ```asn
* OriginatorInfo ::= SEQUENCE {
* certs [0] IMPLICIT CertificateSet OPTIONAL,
* crls [1] IMPLICIT RevocationInfoChoices OPTIONAL }
* ```
*/
export declare class OriginatorInfo {
certs?: CertificateSet;
crls?: RevocationInfoChoices;
constructor(params?: Partial<OriginatorInfo>);
}
+12
View File
@@ -0,0 +1,12 @@
/**
* ```asn
* OtherKeyAttribute ::= SEQUENCE {
* keyAttrId OBJECT IDENTIFIER,
* keyAttr ANY DEFINED BY keyAttrId OPTIONAL }
* ```
*/
export declare class OtherKeyAttribute {
keyAttrId: string;
keyAttr?: ArrayBuffer;
constructor(params?: Partial<OtherKeyAttribute>);
}
@@ -0,0 +1,17 @@
import { CMSVersion, KeyDerivationAlgorithmIdentifier, KeyEncryptionAlgorithmIdentifier, EncryptedKey } from "./types";
/**
* ```asn
* PasswordRecipientInfo ::= SEQUENCE {
* version CMSVersion, -- Always set to 0
* keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier OPTIONAL,
* keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
* encryptedKey EncryptedKey }
* ```
*/
export declare class PasswordRecipientInfo {
version: CMSVersion;
keyDerivationAlgorithm?: KeyDerivationAlgorithmIdentifier;
keyEncryptionAlgorithm: KeyEncryptionAlgorithmIdentifier;
encryptedKey: EncryptedKey;
constructor(params?: Partial<PasswordRecipientInfo>);
}
+34
View File
@@ -0,0 +1,34 @@
import { KeyAgreeRecipientInfo } from "./key_agree_recipient_info";
import { KeyTransRecipientInfo } from "./key_trans_recipient_info";
import { KEKRecipientInfo } from "./kek_recipient_info";
import { PasswordRecipientInfo } from "./password_recipient_info";
/**
* ```asn
* OtherRecipientInfo ::= SEQUENCE {
* oriType OBJECT IDENTIFIER,
* oriValue ANY DEFINED BY oriType }
* ```
*/
export declare class OtherRecipientInfo {
oriType: string;
oriValue: ArrayBuffer;
constructor(params?: Partial<OtherRecipientInfo>);
}
/**
* ```asn
* RecipientInfo ::= CHOICE {
* ktri KeyTransRecipientInfo,
* kari [1] KeyAgreeRecipientInfo,
* kekri [2] KEKRecipientInfo,
* pwri [3] PasswordRecipientInfo,
* ori [4] OtherRecipientInfo }
* ```
*/
export declare class RecipientInfo {
ktri?: KeyTransRecipientInfo;
kari?: KeyAgreeRecipientInfo;
kekri?: KEKRecipientInfo;
pwri?: PasswordRecipientInfo;
ori?: OtherRecipientInfo;
constructor(params?: Partial<RecipientInfo>);
}
+10
View File
@@ -0,0 +1,10 @@
import { AsnArray } from "@peculiar/asn1-schema";
import { RecipientInfo } from "./recipient_info";
/**
* ```asn
* RecipientInfos ::= SET SIZE (1..MAX) OF RecipientInfo
* ```
*/
export declare class RecipientInfos extends AsnArray<RecipientInfo> {
constructor(items?: RecipientInfo[]);
}
@@ -0,0 +1,52 @@
import { AsnArray } from "@peculiar/asn1-schema";
/**
* ```asn
* id-ri OBJECT IDENTIFIER ::=
* { iso(1) identified-organization(3)
dod(6) internet(1) security(5) mechanisms(5) pkix(7) ri(16) }
* ```
*/
export declare const id_ri = "1.3.6.1.5.5.7.16";
/**
* ```asn
* id-ri-ocsp-response OBJECT IDENTIFIER ::= { id-ri 2 }
* ```
*/
export declare const id_ri_ocsp_response = "1.3.6.1.5.5.7.16.2";
/**
* ```asn
* id-ri-scvp OBJECT IDENTIFIER ::= { id-ri 4 }
* ```
*/
export declare const id_ri_scvp = "1.3.6.1.5.5.7.16.4";
/**
* ```asn
* OtherRevocationInfoFormat ::= SEQUENCE {
* otherRevInfoFormat OBJECT IDENTIFIER,
* otherRevInfo ANY DEFINED BY otherRevInfoFormat }
* ```
*/
export declare class OtherRevocationInfoFormat {
otherRevInfoFormat: string;
otherRevInfo: ArrayBuffer;
constructor(params?: Partial<OtherRevocationInfoFormat>);
}
/**
* ```asn
* RevocationInfoChoice ::= CHOICE {
* crl CertificateList,
* other [1] IMPLICIT OtherRevocationInfoFormat }
* ```
*/
export declare class RevocationInfoChoice {
other: OtherRevocationInfoFormat;
constructor(params?: Partial<RevocationInfoChoice>);
}
/**
* ```asn
* RevocationInfoChoices ::= SET OF RevocationInfoChoice
* ```
*/
export declare class RevocationInfoChoices extends AsnArray<RevocationInfoChoice> {
constructor(items?: RevocationInfoChoice[]);
}
+34
View File
@@ -0,0 +1,34 @@
import { AsnArray } from "@peculiar/asn1-schema";
import { CertificateSet } from "./certificate_choices";
import { CMSVersion, DigestAlgorithmIdentifier } from "./types";
import { EncapsulatedContentInfo } from "./encapsulated_content_info";
import { RevocationInfoChoices } from "./revocation_info_choice";
import { SignerInfos } from "./signer_info";
/**
* ```asn
* DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier
* ```
*/
export declare class DigestAlgorithmIdentifiers extends AsnArray<DigestAlgorithmIdentifier> {
constructor(items?: DigestAlgorithmIdentifier[]);
}
/**
* ```asn
* SignedData ::= SEQUENCE {
* version CMSVersion,
* digestAlgorithms DigestAlgorithmIdentifiers,
* encapContentInfo EncapsulatedContentInfo,
* certificates [0] IMPLICIT CertificateSet OPTIONAL,
* crls [1] IMPLICIT RevocationInfoChoices OPTIONAL,
* signerInfos SignerInfos }
* ```
*/
export declare class SignedData {
version: CMSVersion;
digestAlgorithms: DigestAlgorithmIdentifiers;
encapContentInfo: EncapsulatedContentInfo;
certificates?: CertificateSet;
crls?: RevocationInfoChoices;
signerInfos: SignerInfos;
constructor(params?: Partial<SignedData>);
}
+14
View File
@@ -0,0 +1,14 @@
import { IssuerAndSerialNumber } from "./issuer_and_serial_number";
import { SubjectKeyIdentifier } from "@peculiar/asn1-x509";
/**
* ```asn
* SignerIdentifier ::= CHOICE {
* issuerAndSerialNumber IssuerAndSerialNumber,
* subjectKeyIdentifier [0] SubjectKeyIdentifier }
* ```
*/
export declare class SignerIdentifier {
subjectKeyIdentifier?: SubjectKeyIdentifier;
issuerAndSerialNumber?: IssuerAndSerialNumber;
constructor(params?: Partial<SignerIdentifier>);
}
+53
View File
@@ -0,0 +1,53 @@
import { AsnArray, OctetString } from "@peculiar/asn1-schema";
import { SignerIdentifier } from "./signer_identifier";
import { CMSVersion, SignatureAlgorithmIdentifier, DigestAlgorithmIdentifier } from "./types";
import { Attribute } from "./attribute";
/**
* ```asn
* SignedAttributes ::= SET SIZE (1..MAX) OF Attribute
* ```
*/
export type SignedAttributes = Attribute[];
/**
* ```asn
* UnsignedAttributes ::= SET SIZE (1..MAX) OF Attribute
* ```
*/
export type UnsignedAttributes = Attribute[];
/**
* ```asn
* SignatureValue ::= OCTET STRING
* ```
*/
export type SignatureValue = OctetString;
/**
* ```asn
* SignerInfo ::= SEQUENCE {
* version CMSVersion,
* sid SignerIdentifier,
* digestAlgorithm DigestAlgorithmIdentifier,
* signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
* signatureAlgorithm SignatureAlgorithmIdentifier,
* signature SignatureValue,
* unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }
* ```
*/
export declare class SignerInfo {
version: CMSVersion;
sid: SignerIdentifier;
digestAlgorithm: DigestAlgorithmIdentifier;
signedAttrs?: SignedAttributes;
signedAttrsRaw?: ArrayBuffer;
signatureAlgorithm: SignatureAlgorithmIdentifier;
signature: SignatureValue;
unsignedAttrs?: UnsignedAttributes;
constructor(params?: Partial<SignerInfo>);
}
/**
* ```asn
* SignerInfos ::= SET OF SignerInfo
* ```
*/
export declare class SignerInfos extends AsnArray<SignerInfo> {
constructor(items?: SignerInfo[]);
}
+69
View File
@@ -0,0 +1,69 @@
import { AlgorithmIdentifier } from "@peculiar/asn1-x509";
import { OctetString } from "@peculiar/asn1-schema";
/**
* ```asn
* ContentType ::= OBJECT IDENTIFIER
* ```
*/
export type ContentType = string;
/**
* ```asn
* CMSVersion ::= INTEGER { v0(0), v1(1), v2(2), v3(3), v4(4), v5(5) }
* ```
*/
export declare enum CMSVersion {
v0 = 0,
v1 = 1,
v2 = 2,
v3 = 3,
v4 = 4,
v5 = 5
}
/**
* ```asn
* EncryptedKey ::= OCTET STRING
* ```
*/
export type EncryptedKey = OctetString;
/**
* ```asn
* DigestAlgorithmIdentifier ::= AlgorithmIdentifier
* ```
*/
export declare class DigestAlgorithmIdentifier extends AlgorithmIdentifier {
}
/**
* ```asn
* SignatureAlgorithmIdentifier ::= AlgorithmIdentifier
* ```
*/
export declare class SignatureAlgorithmIdentifier extends AlgorithmIdentifier {
}
/**
* ```asn
* KeyEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
* ```
*/
export declare class KeyEncryptionAlgorithmIdentifier extends AlgorithmIdentifier {
}
/**
* ```asn
* ContentEncryptionAlgorithmIdentifier ::= AlgorithmIdentifier
* ```
*/
export declare class ContentEncryptionAlgorithmIdentifier extends AlgorithmIdentifier {
}
/**
* ```asn
* MessageAuthenticationCodeAlgorithm ::= AlgorithmIdentifier
* ```
*/
export declare class MessageAuthenticationCodeAlgorithm extends AlgorithmIdentifier {
}
/**
* ```asn
* KeyDerivationAlgorithmIdentifier ::= AlgorithmIdentifier
* ```
*/
export declare class KeyDerivationAlgorithmIdentifier extends AlgorithmIdentifier {
}