certificate_choices.js 1.8 KB

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