target.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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, optional: true,
  21. })
  22. ], TargetCert.prototype, "targetName", void 0);
  23. __decorate([
  24. AsnProp({
  25. type: ObjectDigestInfo, optional: true,
  26. })
  27. ], TargetCert.prototype, "certDigestInfo", void 0);
  28. let Target = class Target {
  29. targetName;
  30. targetGroup;
  31. targetCert;
  32. constructor(params = {}) {
  33. Object.assign(this, params);
  34. }
  35. };
  36. __decorate([
  37. AsnProp({
  38. type: GeneralName, context: 0, implicit: true,
  39. })
  40. ], Target.prototype, "targetName", void 0);
  41. __decorate([
  42. AsnProp({
  43. type: GeneralName, context: 1, implicit: true,
  44. })
  45. ], Target.prototype, "targetGroup", void 0);
  46. __decorate([
  47. AsnProp({
  48. type: TargetCert, context: 2, implicit: true,
  49. })
  50. ], Target.prototype, "targetCert", void 0);
  51. Target = __decorate([
  52. AsnType({ type: AsnTypeTypes.Choice })
  53. ], Target);
  54. export { Target };
  55. let Targets = Targets_1 = class Targets extends AsnArray {
  56. constructor(items) {
  57. super(items);
  58. Object.setPrototypeOf(this, Targets_1.prototype);
  59. }
  60. };
  61. Targets = Targets_1 = __decorate([
  62. AsnType({
  63. type: AsnTypeTypes.Sequence, itemType: Target,
  64. })
  65. ], Targets);
  66. export { Targets };