50 lines
2.0 KiB
JavaScript
50 lines
2.0 KiB
JavaScript
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);
|