certificate_choices.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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, context: 2, implicit: true,
  33. })
  34. ], CertificateChoices.prototype, "v2AttrCert", void 0);
  35. __decorate([
  36. AsnProp({
  37. type: OtherCertificateFormat, context: 3, implicit: true,
  38. })
  39. ], CertificateChoices.prototype, "other", void 0);
  40. CertificateChoices = __decorate([
  41. AsnType({ type: AsnTypeTypes.Choice })
  42. ], CertificateChoices);
  43. export { CertificateChoices };
  44. let CertificateSet = CertificateSet_1 = class CertificateSet extends AsnArray {
  45. constructor(items) {
  46. super(items);
  47. Object.setPrototypeOf(this, CertificateSet_1.prototype);
  48. }
  49. };
  50. CertificateSet = CertificateSet_1 = __decorate([
  51. AsnType({
  52. type: AsnTypeTypes.Set, itemType: CertificateChoices,
  53. })
  54. ], CertificateSet);
  55. export { CertificateSet };