attribute_certificate_info.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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,
  40. converter: AsnIntegerArrayBufferConverter,
  41. })
  42. ], AttributeCertificateInfo.prototype, "serialNumber", void 0);
  43. __decorate([
  44. AsnProp({ type: AttCertValidityPeriod })
  45. ], AttributeCertificateInfo.prototype, "attrCertValidityPeriod", void 0);
  46. __decorate([
  47. AsnProp({
  48. type: Attribute,
  49. repeated: "sequence",
  50. })
  51. ], AttributeCertificateInfo.prototype, "attributes", void 0);
  52. __decorate([
  53. AsnProp({
  54. type: AsnPropTypes.BitString,
  55. optional: true,
  56. })
  57. ], AttributeCertificateInfo.prototype, "issuerUniqueID", void 0);
  58. __decorate([
  59. AsnProp({
  60. type: Extensions,
  61. optional: true,
  62. })
  63. ], AttributeCertificateInfo.prototype, "extensions", void 0);