certificate_choices.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. "use strict";
  2. var CertificateSet_1;
  3. Object.defineProperty(exports, "__esModule", { value: true });
  4. exports.CertificateSet = exports.CertificateChoices = exports.OtherCertificateFormat = void 0;
  5. const tslib_1 = require("tslib");
  6. const asn1_schema_1 = require("@peculiar/asn1-schema");
  7. const asn1_x509_1 = require("@peculiar/asn1-x509");
  8. const asn1_x509_attr_1 = require("@peculiar/asn1-x509-attr");
  9. class OtherCertificateFormat {
  10. otherCertFormat = "";
  11. otherCert = new ArrayBuffer(0);
  12. constructor(params = {}) {
  13. Object.assign(this, params);
  14. }
  15. }
  16. exports.OtherCertificateFormat = OtherCertificateFormat;
  17. tslib_1.__decorate([
  18. (0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
  19. ], OtherCertificateFormat.prototype, "otherCertFormat", void 0);
  20. tslib_1.__decorate([
  21. (0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any })
  22. ], OtherCertificateFormat.prototype, "otherCert", void 0);
  23. let CertificateChoices = class CertificateChoices {
  24. certificate;
  25. v2AttrCert;
  26. other;
  27. constructor(params = {}) {
  28. Object.assign(this, params);
  29. }
  30. };
  31. exports.CertificateChoices = CertificateChoices;
  32. tslib_1.__decorate([
  33. (0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.Certificate })
  34. ], CertificateChoices.prototype, "certificate", void 0);
  35. tslib_1.__decorate([
  36. (0, asn1_schema_1.AsnProp)({
  37. type: asn1_x509_attr_1.AttributeCertificate, context: 2, implicit: true,
  38. })
  39. ], CertificateChoices.prototype, "v2AttrCert", void 0);
  40. tslib_1.__decorate([
  41. (0, asn1_schema_1.AsnProp)({
  42. type: OtherCertificateFormat, context: 3, implicit: true,
  43. })
  44. ], CertificateChoices.prototype, "other", void 0);
  45. exports.CertificateChoices = CertificateChoices = tslib_1.__decorate([
  46. (0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
  47. ], CertificateChoices);
  48. let CertificateSet = CertificateSet_1 = class CertificateSet extends asn1_schema_1.AsnArray {
  49. constructor(items) {
  50. super(items);
  51. Object.setPrototypeOf(this, CertificateSet_1.prototype);
  52. }
  53. };
  54. exports.CertificateSet = CertificateSet;
  55. exports.CertificateSet = CertificateSet = CertificateSet_1 = tslib_1.__decorate([
  56. (0, asn1_schema_1.AsnType)({
  57. type: asn1_schema_1.AsnTypeTypes.Set, itemType: CertificateChoices,
  58. })
  59. ], CertificateSet);