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
+26
View File
@@ -0,0 +1,26 @@
var PKCS12AttrSet_1;
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnArray, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
export class PKCS12Attribute {
constructor(params = {}) {
this.attrId = "";
this.attrValues = [];
Object.assign(params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], PKCS12Attribute.prototype, "attrId", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, repeated: "set" })
], PKCS12Attribute.prototype, "attrValues", void 0);
let PKCS12AttrSet = PKCS12AttrSet_1 = class PKCS12AttrSet extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, PKCS12AttrSet_1.prototype);
}
};
PKCS12AttrSet = PKCS12AttrSet_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: PKCS12Attribute })
], PKCS12AttrSet);
export { PKCS12AttrSet };
+14
View File
@@ -0,0 +1,14 @@
var AuthenticatedSafe_1;
import { __decorate } from "tslib";
import { AsnArray, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { ContentInfo } from "@peculiar/asn1-cms";
let AuthenticatedSafe = AuthenticatedSafe_1 = class AuthenticatedSafe extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, AuthenticatedSafe_1.prototype);
}
};
AuthenticatedSafe = AuthenticatedSafe_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: ContentInfo })
], AuthenticatedSafe);
export { AuthenticatedSafe };
+19
View File
@@ -0,0 +1,19 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { id_pkcs_9 } from "./types";
export class CertBag {
constructor(params = {}) {
this.certId = "";
this.certValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], CertBag.prototype, "certId", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, context: 0 })
], CertBag.prototype, "certValue", void 0);
export const id_certTypes = `${id_pkcs_9}.22`;
export const id_x509Certificate = `${id_certTypes}.1`;
export const id_sdsiCertificate = `${id_certTypes}.2`;
+18
View File
@@ -0,0 +1,18 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { id_pkcs_9 } from "./types";
export class CRLBag {
constructor(params = {}) {
this.crlId = "";
this.crltValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], CRLBag.prototype, "crlId", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, context: 0 })
], CRLBag.prototype, "crltValue", void 0);
export const id_crlTypes = `${id_pkcs_9}.23`;
export const id_x509CRL = `${id_crlTypes}.1`;
+6
View File
@@ -0,0 +1,6 @@
export * from "./cert_bag";
export * from "./crl_bag";
export * from "./key_bag";
export * from "./pkcs8_shrouded_key_bag";
export * from "./secret_bag";
export * from "./types";
+9
View File
@@ -0,0 +1,9 @@
import { __decorate } from "tslib";
import { PrivateKeyInfo } from "@peculiar/asn1-pkcs8";
import { AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
let KeyBag = class KeyBag extends PrivateKeyInfo {
};
KeyBag = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], KeyBag);
export { KeyBag };
@@ -0,0 +1,9 @@
import { __decorate } from "tslib";
import { EncryptedPrivateKeyInfo } from "@peculiar/asn1-pkcs8";
import { AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
let PKCS8ShroudedKeyBag = class PKCS8ShroudedKeyBag extends EncryptedPrivateKeyInfo {
};
PKCS8ShroudedKeyBag = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], PKCS8ShroudedKeyBag);
export { PKCS8ShroudedKeyBag };
+15
View File
@@ -0,0 +1,15 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
export class SecretBag {
constructor(params = {}) {
this.secretTypeId = "";
this.secretValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], SecretBag.prototype, "secretTypeId", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, context: 0 })
], SecretBag.prototype, "secretValue", void 0);
+8
View File
@@ -0,0 +1,8 @@
import { id_bagtypes } from "../object_identifiers";
export const id_keyBag = `${id_bagtypes}.1`;
export const id_pkcs8ShroudedKeyBag = `${id_bagtypes}.2`;
export const id_certBag = `${id_bagtypes}.3`;
export const id_CRLBag = `${id_bagtypes}.4`;
export const id_SecretBag = `${id_bagtypes}.5`;
export const id_SafeContents = `${id_bagtypes}.6`;
export const id_pkcs_9 = "1.2.840.113549.1.9";
+7
View File
@@ -0,0 +1,7 @@
export * from "./attribute";
export * from "./authenticated_safe";
export * from "./bags";
export * from "./mac_data";
export * from "./object_identifiers";
export * from "./pfx";
export * from "./safe_bag";
+20
View File
@@ -0,0 +1,20 @@
import { __decorate } from "tslib";
import { DigestInfo } from "@peculiar/asn1-rsa";
import { AsnProp, AsnPropTypes, OctetString } from "@peculiar/asn1-schema";
export class MacData {
constructor(params = {}) {
this.mac = new DigestInfo();
this.macSalt = new OctetString();
this.iterations = 1;
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: DigestInfo })
], MacData.prototype, "mac", void 0);
__decorate([
AsnProp({ type: OctetString })
], MacData.prototype, "macSalt", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer, defaultValue: 1 })
], MacData.prototype, "iterations", void 0);
+11
View File
@@ -0,0 +1,11 @@
export const id_rsadsi = "1.2.840.113549";
export const id_pkcs = `${id_rsadsi}.1`;
export const id_pkcs_12 = `${id_pkcs}.12`;
export const id_pkcs_12PbeIds = `${id_pkcs_12}.1`;
export const id_pbeWithSHAAnd128BitRC4 = `${id_pkcs_12PbeIds}.1`;
export const id_pbeWithSHAAnd40BitRC4 = `${id_pkcs_12PbeIds}.2`;
export const id_pbeWithSHAAnd3_KeyTripleDES_CBC = `${id_pkcs_12PbeIds}.3`;
export const id_pbeWithSHAAnd2_KeyTripleDES_CBC = `${id_pkcs_12PbeIds}.4`;
export const id_pbeWithSHAAnd128BitRC2_CBC = `${id_pkcs_12PbeIds}.5`;
export const id_pbewithSHAAnd40BitRC2_CBC = `${id_pkcs_12PbeIds}.6`;
export const id_bagtypes = `${id_pkcs_12}.10.1`;
+21
View File
@@ -0,0 +1,21 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { ContentInfo } from "@peculiar/asn1-cms";
import { MacData } from "./mac_data";
export class PFX {
constructor(params = {}) {
this.version = 3;
this.authSafe = new ContentInfo();
this.macData = new MacData();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], PFX.prototype, "version", void 0);
__decorate([
AsnProp({ type: ContentInfo })
], PFX.prototype, "authSafe", void 0);
__decorate([
AsnProp({ type: MacData, optional: true })
], PFX.prototype, "macData", void 0);
+30
View File
@@ -0,0 +1,30 @@
var SafeContents_1;
import { __decorate } from "tslib";
import { AsnArray, AsnType, AsnTypeTypes, AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { PKCS12Attribute } from "./attribute";
export class SafeBag {
constructor(params = {}) {
this.bagId = "";
this.bagValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], SafeBag.prototype, "bagId", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, context: 0 })
], SafeBag.prototype, "bagValue", void 0);
__decorate([
AsnProp({ type: PKCS12Attribute, repeated: "set", optional: true })
], SafeBag.prototype, "bagAttributes", void 0);
let SafeContents = SafeContents_1 = class SafeContents extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, SafeContents_1.prototype);
}
};
SafeContents = SafeContents_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: SafeBag })
], SafeContents);
export { SafeContents };