certificate_choices.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. constructor(params = {}) {
  8. this.otherCertFormat = "";
  9. this.otherCert = new ArrayBuffer(0);
  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. constructor(params = {}) {
  21. Object.assign(this, params);
  22. }
  23. };
  24. __decorate([
  25. AsnProp({ type: Certificate })
  26. ], CertificateChoices.prototype, "certificate", void 0);
  27. __decorate([
  28. AsnProp({ type: AttributeCertificate, context: 2, implicit: true })
  29. ], CertificateChoices.prototype, "v2AttrCert", void 0);
  30. __decorate([
  31. AsnProp({ type: OtherCertificateFormat, context: 3, implicit: true })
  32. ], CertificateChoices.prototype, "other", void 0);
  33. CertificateChoices = __decorate([
  34. AsnType({ type: AsnTypeTypes.Choice })
  35. ], CertificateChoices);
  36. export { CertificateChoices };
  37. let CertificateSet = CertificateSet_1 = class CertificateSet extends AsnArray {
  38. constructor(items) {
  39. super(items);
  40. Object.setPrototypeOf(this, CertificateSet_1.prototype);
  41. }
  42. };
  43. CertificateSet = CertificateSet_1 = __decorate([
  44. AsnType({ type: AsnTypeTypes.Set, itemType: CertificateChoices })
  45. ], CertificateSet);
  46. export { CertificateSet };