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
+20
View File
@@ -0,0 +1,20 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { GeneralName, Attribute } from "@peculiar/asn1-x509";
export class ACClearAttrs {
constructor(params = {}) {
this.acIssuer = new GeneralName();
this.acSerial = 0;
this.attrs = [];
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: GeneralName })
], ACClearAttrs.prototype, "acIssuer", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], ACClearAttrs.prototype, "acSerial", void 0);
__decorate([
AsnProp({ type: Attribute, repeated: "sequence" })
], ACClearAttrs.prototype, "attrs", void 0);
+21
View File
@@ -0,0 +1,21 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { AttrSpec } from "./attr_spec";
export class AAControls {
constructor(params = {}) {
this.permitUnSpecified = true;
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer, optional: true })
], AAControls.prototype, "pathLenConstraint", void 0);
__decorate([
AsnProp({ type: AttrSpec, implicit: true, context: 0, optional: true })
], AAControls.prototype, "permittedAttrs", void 0);
__decorate([
AsnProp({ type: AttrSpec, implicit: true, context: 1, optional: true })
], AAControls.prototype, "excludedAttrs", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Boolean, defaultValue: true })
], AAControls.prototype, "permitUnSpecified", void 0);
+19
View File
@@ -0,0 +1,19 @@
import { __decorate } from "tslib";
import { AsnType, AsnTypeTypes, AsnProp } from "@peculiar/asn1-schema";
import { GeneralName } from "@peculiar/asn1-x509";
import { V2Form } from "./v2_form";
let AttCertIssuer = class AttCertIssuer {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: GeneralName, repeated: "sequence" })
], AttCertIssuer.prototype, "v1Form", void 0);
__decorate([
AsnProp({ type: V2Form, context: 0, implicit: true })
], AttCertIssuer.prototype, "v2Form", void 0);
AttCertIssuer = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], AttCertIssuer);
export { AttCertIssuer };
@@ -0,0 +1,15 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
export class AttCertValidityPeriod {
constructor(params = {}) {
this.notBeforeTime = new Date();
this.notAfterTime = new Date();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.GeneralizedTime })
], AttCertValidityPeriod.prototype, "notBeforeTime", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.GeneralizedTime })
], AttCertValidityPeriod.prototype, "notAfterTime", void 0);
+13
View File
@@ -0,0 +1,13 @@
var AttrSpec_1;
import { __decorate } from "tslib";
import { AsnType, AsnTypeTypes, AsnPropTypes, AsnArray } from "@peculiar/asn1-schema";
let AttrSpec = AttrSpec_1 = class AttrSpec extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, AttrSpec_1.prototype);
}
};
AttrSpec = AttrSpec_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: AsnPropTypes.ObjectIdentifier })
], AttrSpec);
export { AttrSpec };
@@ -0,0 +1,21 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { AlgorithmIdentifier } from "@peculiar/asn1-x509";
import { AttributeCertificateInfo } from "./attribute_certificate_info";
export class AttributeCertificate {
constructor(params = {}) {
this.acinfo = new AttributeCertificateInfo();
this.signatureAlgorithm = new AlgorithmIdentifier();
this.signatureValue = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AttributeCertificateInfo })
], AttributeCertificate.prototype, "acinfo", void 0);
__decorate([
AsnProp({ type: AlgorithmIdentifier })
], AttributeCertificate.prototype, "signatureAlgorithm", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.BitString })
], AttributeCertificate.prototype, "signatureValue", void 0);
@@ -0,0 +1,49 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnIntegerArrayBufferConverter } from "@peculiar/asn1-schema";
import { AlgorithmIdentifier, Attribute, Extensions, } from "@peculiar/asn1-x509";
import { Holder } from "./holder";
import { AttCertIssuer } from "./attr_cert_issuer";
import { AttCertValidityPeriod } from "./attr_cert_validity_period";
export var AttCertVersion;
(function (AttCertVersion) {
AttCertVersion[AttCertVersion["v2"] = 1] = "v2";
})(AttCertVersion || (AttCertVersion = {}));
export class AttributeCertificateInfo {
constructor(params = {}) {
this.version = AttCertVersion.v2;
this.holder = new Holder();
this.issuer = new AttCertIssuer();
this.signature = new AlgorithmIdentifier();
this.serialNumber = new ArrayBuffer(0);
this.attrCertValidityPeriod = new AttCertValidityPeriod();
this.attributes = [];
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], AttributeCertificateInfo.prototype, "version", void 0);
__decorate([
AsnProp({ type: Holder })
], AttributeCertificateInfo.prototype, "holder", void 0);
__decorate([
AsnProp({ type: AttCertIssuer })
], AttributeCertificateInfo.prototype, "issuer", void 0);
__decorate([
AsnProp({ type: AlgorithmIdentifier })
], AttributeCertificateInfo.prototype, "signature", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter })
], AttributeCertificateInfo.prototype, "serialNumber", void 0);
__decorate([
AsnProp({ type: AttCertValidityPeriod })
], AttributeCertificateInfo.prototype, "attrCertValidityPeriod", void 0);
__decorate([
AsnProp({ type: Attribute, repeated: "sequence" })
], AttributeCertificateInfo.prototype, "attributes", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.BitString, optional: true })
], AttributeCertificateInfo.prototype, "issuerUniqueID", void 0);
__decorate([
AsnProp({ type: Extensions, optional: true })
], AttributeCertificateInfo.prototype, "extensions", void 0);
+12
View File
@@ -0,0 +1,12 @@
import { BitString } from "@peculiar/asn1-schema";
export var ClassListFlags;
(function (ClassListFlags) {
ClassListFlags[ClassListFlags["unmarked"] = 1] = "unmarked";
ClassListFlags[ClassListFlags["unclassified"] = 2] = "unclassified";
ClassListFlags[ClassListFlags["restricted"] = 4] = "restricted";
ClassListFlags[ClassListFlags["confidential"] = 8] = "confidential";
ClassListFlags[ClassListFlags["secret"] = 16] = "secret";
ClassListFlags[ClassListFlags["topSecret"] = 32] = "topSecret";
})(ClassListFlags || (ClassListFlags = {}));
export class ClassList extends BitString {
}
+20
View File
@@ -0,0 +1,20 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { ClassList, ClassListFlags } from "./class_list";
import { SecurityCategory } from "./security_category";
export class Clearance {
constructor(params = {}) {
this.policyId = "";
this.classList = new ClassList(ClassListFlags.unclassified);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], Clearance.prototype, "policyId", void 0);
__decorate([
AsnProp({ type: ClassList, defaultValue: new ClassList(ClassListFlags.unclassified) })
], Clearance.prototype, "classList", void 0);
__decorate([
AsnProp({ type: SecurityCategory, repeated: "set" })
], Clearance.prototype, "securityCategories", void 0);
+19
View File
@@ -0,0 +1,19 @@
import { __decorate } from "tslib";
import { AsnProp } from "@peculiar/asn1-schema";
import { IssuerSerial } from "./issuer_serial";
import { GeneralNames } from "@peculiar/asn1-x509";
import { ObjectDigestInfo } from "./object_digest_info";
export class Holder {
constructor(params = {}) {
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: IssuerSerial, implicit: true, context: 0, optional: true })
], Holder.prototype, "baseCertificateID", void 0);
__decorate([
AsnProp({ type: GeneralNames, implicit: true, context: 1, optional: true })
], Holder.prototype, "entityName", void 0);
__decorate([
AsnProp({ type: ObjectDigestInfo, implicit: true, context: 2, optional: true })
], Holder.prototype, "objectDigestInfo", void 0);
+29
View File
@@ -0,0 +1,29 @@
import { __decorate } from "tslib";
import { AsnProp, OctetString, AsnPropTypes } from "@peculiar/asn1-schema";
import { GeneralNames } from "@peculiar/asn1-x509";
export class IetfAttrSyntaxValueChoices {
constructor(params = {}) {
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: OctetString })
], IetfAttrSyntaxValueChoices.prototype, "cotets", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier })
], IetfAttrSyntaxValueChoices.prototype, "oid", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Utf8String })
], IetfAttrSyntaxValueChoices.prototype, "string", void 0);
export class IetfAttrSyntax {
constructor(params = {}) {
this.values = [];
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: GeneralNames, implicit: true, context: 0, optional: true })
], IetfAttrSyntax.prototype, "policyAuthority", void 0);
__decorate([
AsnProp({ type: IetfAttrSyntaxValueChoices, repeated: "sequence" })
], IetfAttrSyntax.prototype, "values", void 0);
+20
View File
@@ -0,0 +1,20 @@
export * from "./aa_clear_attrs";
export * from "./aa_controls";
export * from "./attr_cert_issuer";
export * from "./attr_cert_validity_period";
export * from "./attr_spec";
export * from "./attribute_certificate";
export * from "./attribute_certificate_info";
export * from "./class_list";
export * from "./clearance";
export * from "./holder";
export * from "./ietf_attr_syntax";
export * from "./issuer_serial";
export * from "./object_digest_info";
export * from "./object_identifiers";
export * from "./proxy_info";
export * from "./role_syntax";
export * from "./security_category";
export * from "./svce_auth_info";
export * from "./target";
export * from "./v2_form";
+20
View File
@@ -0,0 +1,20 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnIntegerArrayBufferConverter } from "@peculiar/asn1-schema";
import { GeneralNames } from "@peculiar/asn1-x509";
export class IssuerSerial {
constructor(params = {}) {
this.issuer = new GeneralNames();
this.serial = new ArrayBuffer(0);
this.issuerUID = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: GeneralNames })
], IssuerSerial.prototype, "issuer", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter })
], IssuerSerial.prototype, "serial", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.BitString, optional: true })
], IssuerSerial.prototype, "issuerUID", void 0);
@@ -0,0 +1,29 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { AlgorithmIdentifier } from "@peculiar/asn1-x509";
export var DigestedObjectType;
(function (DigestedObjectType) {
DigestedObjectType[DigestedObjectType["publicKey"] = 0] = "publicKey";
DigestedObjectType[DigestedObjectType["publicKeyCert"] = 1] = "publicKeyCert";
DigestedObjectType[DigestedObjectType["otherObjectTypes"] = 2] = "otherObjectTypes";
})(DigestedObjectType || (DigestedObjectType = {}));
export class ObjectDigestInfo {
constructor(params = {}) {
this.digestedObjectType = DigestedObjectType.publicKey;
this.digestAlgorithm = new AlgorithmIdentifier();
this.objectDigest = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Enumerated })
], ObjectDigestInfo.prototype, "digestedObjectType", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier, optional: true })
], ObjectDigestInfo.prototype, "otherObjectTypeID", void 0);
__decorate([
AsnProp({ type: AlgorithmIdentifier })
], ObjectDigestInfo.prototype, "digestAlgorithm", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.BitString })
], ObjectDigestInfo.prototype, "objectDigest", void 0);
@@ -0,0 +1,14 @@
import { id_pe, id_ce, id_pkix } from "@peculiar/asn1-x509";
export const id_pe_ac_auditIdentity = `${id_pe}.4`;
export const id_pe_aaControls = `${id_pe}.6`;
export const id_pe_ac_proxying = `${id_pe}.10`;
export const id_ce_targetInformation = `${id_ce}.55`;
export const id_aca = `${id_pkix}.10`;
export const id_aca_authenticationInfo = `${id_aca}.1`;
export const id_aca_accessIdentity = `${id_aca}.2`;
export const id_aca_chargingIdentity = `${id_aca}.3`;
export const id_aca_group = `${id_aca}.4`;
export const id_aca_encAttrs = `${id_aca}.6`;
export const id_at = "2.5.4";
export const id_at_role = `${id_at}.72`;
export const id_at_clearance = "2.5.1.5.55";
+14
View File
@@ -0,0 +1,14 @@
var ProxyInfo_1;
import { __decorate } from "tslib";
import { AsnType, AsnTypeTypes, AsnArray } from "@peculiar/asn1-schema";
import { Targets } from "./target";
let ProxyInfo = ProxyInfo_1 = class ProxyInfo extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, ProxyInfo_1.prototype);
}
};
ProxyInfo = ProxyInfo_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: Targets })
], ProxyInfo);
export { ProxyInfo };
+14
View File
@@ -0,0 +1,14 @@
import { __decorate } from "tslib";
import { AsnProp } from "@peculiar/asn1-schema";
import { GeneralNames, GeneralName } from "@peculiar/asn1-x509";
export class RoleSyntax {
constructor(params = {}) {
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: GeneralNames, implicit: true, context: 0, optional: true })
], RoleSyntax.prototype, "roleAuthority", void 0);
__decorate([
AsnProp({ type: GeneralName, implicit: true, context: 1 })
], RoleSyntax.prototype, "roleName", void 0);
@@ -0,0 +1,15 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
export class SecurityCategory {
constructor(params = {}) {
this.type = "";
this.value = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.ObjectIdentifier, implicit: true, context: 0 })
], SecurityCategory.prototype, "type", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Any, implicit: true, context: 1 })
], SecurityCategory.prototype, "value", void 0);
+19
View File
@@ -0,0 +1,19 @@
import { __decorate } from "tslib";
import { AsnProp, OctetString } from "@peculiar/asn1-schema";
import { GeneralName } from "@peculiar/asn1-x509";
export class SvceAuthInfo {
constructor(params = {}) {
this.service = new GeneralName();
this.ident = new GeneralName();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: GeneralName })
], SvceAuthInfo.prototype, "service", void 0);
__decorate([
AsnProp({ type: GeneralName })
], SvceAuthInfo.prototype, "ident", void 0);
__decorate([
AsnProp({ type: OctetString, optional: true })
], SvceAuthInfo.prototype, "authInfo", void 0);
+49
View File
@@ -0,0 +1,49 @@
var Targets_1;
import { __decorate } from "tslib";
import { AsnProp, AsnType, AsnTypeTypes, AsnArray } from "@peculiar/asn1-schema";
import { GeneralName } from "@peculiar/asn1-x509";
import { IssuerSerial } from "./issuer_serial";
import { ObjectDigestInfo } from "./object_digest_info";
export class TargetCert {
constructor(params = {}) {
this.targetCertificate = new IssuerSerial();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: IssuerSerial })
], TargetCert.prototype, "targetCertificate", void 0);
__decorate([
AsnProp({ type: GeneralName, optional: true })
], TargetCert.prototype, "targetName", void 0);
__decorate([
AsnProp({ type: ObjectDigestInfo, optional: true })
], TargetCert.prototype, "certDigestInfo", void 0);
let Target = class Target {
constructor(params = {}) {
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: GeneralName, context: 0, implicit: true })
], Target.prototype, "targetName", void 0);
__decorate([
AsnProp({ type: GeneralName, context: 1, implicit: true })
], Target.prototype, "targetGroup", void 0);
__decorate([
AsnProp({ type: TargetCert, context: 2, implicit: true })
], Target.prototype, "targetCert", void 0);
Target = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], Target);
export { Target };
let Targets = Targets_1 = class Targets extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, Targets_1.prototype);
}
};
Targets = Targets_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: Target })
], Targets);
export { Targets };
+19
View File
@@ -0,0 +1,19 @@
import { __decorate } from "tslib";
import { AsnProp } from "@peculiar/asn1-schema";
import { GeneralNames } from "@peculiar/asn1-x509";
import { IssuerSerial } from "./issuer_serial";
import { ObjectDigestInfo } from "./object_digest_info";
export class V2Form {
constructor(params = {}) {
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: GeneralNames, optional: true })
], V2Form.prototype, "issuerName", void 0);
__decorate([
AsnProp({ type: IssuerSerial, context: 0, implicit: true, optional: true })
], V2Form.prototype, "baseCertificateID", void 0);
__decorate([
AsnProp({ type: ObjectDigestInfo, context: 1, implicit: true, optional: true })
], V2Form.prototype, "objectDigestInfo", void 0);