attribute_certificate_info.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import { __decorate } from "tslib";
  2. import { AsnProp, AsnPropTypes, AsnIntegerArrayBufferConverter, } from "@peculiar/asn1-schema";
  3. import { AlgorithmIdentifier, Attribute, Extensions, } from "@peculiar/asn1-x509";
  4. import { Holder } from "./holder.js";
  5. import { AttCertIssuer } from "./attr_cert_issuer.js";
  6. import { AttCertValidityPeriod } from "./attr_cert_validity_period.js";
  7. export var AttCertVersion;
  8. (function (AttCertVersion) {
  9. AttCertVersion[AttCertVersion["v2"] = 1] = "v2";
  10. })(AttCertVersion || (AttCertVersion = {}));
  11. export class AttributeCertificateInfo {
  12. version = AttCertVersion.v2;
  13. holder = new Holder();
  14. issuer = new AttCertIssuer();
  15. signature = new AlgorithmIdentifier();
  16. serialNumber = new ArrayBuffer(0);
  17. attrCertValidityPeriod = new AttCertValidityPeriod();
  18. attributes = [];
  19. issuerUniqueID;
  20. extensions;
  21. constructor(params = {}) {
  22. Object.assign(this, params);
  23. }
  24. }
  25. __decorate([
  26. AsnProp({ type: AsnPropTypes.Integer })
  27. ], AttributeCertificateInfo.prototype, "version", void 0);
  28. __decorate([
  29. AsnProp({ type: Holder })
  30. ], AttributeCertificateInfo.prototype, "holder", void 0);
  31. __decorate([
  32. AsnProp({ type: AttCertIssuer })
  33. ], AttributeCertificateInfo.prototype, "issuer", void 0);
  34. __decorate([
  35. AsnProp({ type: AlgorithmIdentifier })
  36. ], AttributeCertificateInfo.prototype, "signature", void 0);
  37. __decorate([
  38. AsnProp({
  39. type: AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter,
  40. })
  41. ], AttributeCertificateInfo.prototype, "serialNumber", void 0);
  42. __decorate([
  43. AsnProp({ type: AttCertValidityPeriod })
  44. ], AttributeCertificateInfo.prototype, "attrCertValidityPeriod", void 0);
  45. __decorate([
  46. AsnProp({
  47. type: Attribute, repeated: "sequence",
  48. })
  49. ], AttributeCertificateInfo.prototype, "attributes", void 0);
  50. __decorate([
  51. AsnProp({
  52. type: AsnPropTypes.BitString, optional: true,
  53. })
  54. ], AttributeCertificateInfo.prototype, "issuerUniqueID", void 0);
  55. __decorate([
  56. AsnProp({
  57. type: Extensions, optional: true,
  58. })
  59. ], AttributeCertificateInfo.prototype, "extensions", void 0);