target.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. var Targets_1;
  2. import { __decorate } from "tslib";
  3. import { AsnProp, AsnType, AsnTypeTypes, AsnArray } from "@peculiar/asn1-schema";
  4. import { GeneralName } from "@peculiar/asn1-x509";
  5. import { IssuerSerial } from "./issuer_serial.js";
  6. import { ObjectDigestInfo } from "./object_digest_info.js";
  7. export class TargetCert {
  8. targetCertificate = new IssuerSerial();
  9. targetName;
  10. certDigestInfo;
  11. constructor(params = {}) {
  12. Object.assign(this, params);
  13. }
  14. }
  15. __decorate([
  16. AsnProp({ type: IssuerSerial })
  17. ], TargetCert.prototype, "targetCertificate", void 0);
  18. __decorate([
  19. AsnProp({
  20. type: GeneralName,
  21. optional: true,
  22. })
  23. ], TargetCert.prototype, "targetName", void 0);
  24. __decorate([
  25. AsnProp({
  26. type: ObjectDigestInfo,
  27. optional: true,
  28. })
  29. ], TargetCert.prototype, "certDigestInfo", void 0);
  30. let Target = class Target {
  31. targetName;
  32. targetGroup;
  33. targetCert;
  34. constructor(params = {}) {
  35. Object.assign(this, params);
  36. }
  37. };
  38. __decorate([
  39. AsnProp({
  40. type: GeneralName,
  41. context: 0,
  42. implicit: true,
  43. })
  44. ], Target.prototype, "targetName", void 0);
  45. __decorate([
  46. AsnProp({
  47. type: GeneralName,
  48. context: 1,
  49. implicit: true,
  50. })
  51. ], Target.prototype, "targetGroup", void 0);
  52. __decorate([
  53. AsnProp({
  54. type: TargetCert,
  55. context: 2,
  56. implicit: true,
  57. })
  58. ], Target.prototype, "targetCert", void 0);
  59. Target = __decorate([
  60. AsnType({ type: AsnTypeTypes.Choice })
  61. ], Target);
  62. export { Target };
  63. let Targets = Targets_1 = class Targets extends AsnArray {
  64. constructor(items) {
  65. super(items);
  66. Object.setPrototypeOf(this, Targets_1.prototype);
  67. }
  68. };
  69. Targets = Targets_1 = __decorate([
  70. AsnType({
  71. type: AsnTypeTypes.Sequence,
  72. itemType: Target,
  73. })
  74. ], Targets);
  75. export { Targets };