certificate_policies.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. var CertificatePolicies_1;
  2. import { __decorate } from "tslib";
  3. import { AsnProp, AsnPropTypes, AsnType, AsnTypeTypes, AsnArray } from "@peculiar/asn1-schema";
  4. import { id_ce } from "../object_identifiers.js";
  5. export const id_ce_certificatePolicies = `${id_ce}.32`;
  6. export const id_ce_certificatePolicies_anyPolicy = `${id_ce_certificatePolicies}.0`;
  7. let DisplayText = class DisplayText {
  8. ia5String;
  9. visibleString;
  10. bmpString;
  11. utf8String;
  12. constructor(params = {}) {
  13. Object.assign(this, params);
  14. }
  15. toString() {
  16. return this.ia5String || this.visibleString || this.bmpString || this.utf8String || "";
  17. }
  18. };
  19. __decorate([
  20. AsnProp({ type: AsnPropTypes.IA5String })
  21. ], DisplayText.prototype, "ia5String", void 0);
  22. __decorate([
  23. AsnProp({ type: AsnPropTypes.VisibleString })
  24. ], DisplayText.prototype, "visibleString", void 0);
  25. __decorate([
  26. AsnProp({ type: AsnPropTypes.BmpString })
  27. ], DisplayText.prototype, "bmpString", void 0);
  28. __decorate([
  29. AsnProp({ type: AsnPropTypes.Utf8String })
  30. ], DisplayText.prototype, "utf8String", void 0);
  31. DisplayText = __decorate([
  32. AsnType({ type: AsnTypeTypes.Choice })
  33. ], DisplayText);
  34. export { DisplayText };
  35. export class NoticeReference {
  36. organization = new DisplayText();
  37. noticeNumbers = [];
  38. constructor(params = {}) {
  39. Object.assign(this, params);
  40. }
  41. }
  42. __decorate([
  43. AsnProp({ type: DisplayText })
  44. ], NoticeReference.prototype, "organization", void 0);
  45. __decorate([
  46. AsnProp({
  47. type: AsnPropTypes.Integer,
  48. repeated: "sequence",
  49. })
  50. ], NoticeReference.prototype, "noticeNumbers", void 0);
  51. export class UserNotice {
  52. noticeRef;
  53. explicitText;
  54. constructor(params = {}) {
  55. Object.assign(this, params);
  56. }
  57. }
  58. __decorate([
  59. AsnProp({
  60. type: NoticeReference,
  61. optional: true,
  62. })
  63. ], UserNotice.prototype, "noticeRef", void 0);
  64. __decorate([
  65. AsnProp({
  66. type: DisplayText,
  67. optional: true,
  68. })
  69. ], UserNotice.prototype, "explicitText", void 0);
  70. let Qualifier = class Qualifier {
  71. cPSuri;
  72. userNotice;
  73. constructor(params = {}) {
  74. Object.assign(this, params);
  75. }
  76. };
  77. __decorate([
  78. AsnProp({ type: AsnPropTypes.IA5String })
  79. ], Qualifier.prototype, "cPSuri", void 0);
  80. __decorate([
  81. AsnProp({ type: UserNotice })
  82. ], Qualifier.prototype, "userNotice", void 0);
  83. Qualifier = __decorate([
  84. AsnType({ type: AsnTypeTypes.Choice })
  85. ], Qualifier);
  86. export { Qualifier };
  87. export class PolicyQualifierInfo {
  88. policyQualifierId = "";
  89. qualifier = new ArrayBuffer(0);
  90. constructor(params = {}) {
  91. Object.assign(this, params);
  92. }
  93. }
  94. __decorate([
  95. AsnProp({ type: AsnPropTypes.ObjectIdentifier })
  96. ], PolicyQualifierInfo.prototype, "policyQualifierId", void 0);
  97. __decorate([
  98. AsnProp({ type: AsnPropTypes.Any })
  99. ], PolicyQualifierInfo.prototype, "qualifier", void 0);
  100. export class PolicyInformation {
  101. policyIdentifier = "";
  102. policyQualifiers;
  103. constructor(params = {}) {
  104. Object.assign(this, params);
  105. }
  106. }
  107. __decorate([
  108. AsnProp({ type: AsnPropTypes.ObjectIdentifier })
  109. ], PolicyInformation.prototype, "policyIdentifier", void 0);
  110. __decorate([
  111. AsnProp({
  112. type: PolicyQualifierInfo,
  113. repeated: "sequence",
  114. optional: true,
  115. })
  116. ], PolicyInformation.prototype, "policyQualifiers", void 0);
  117. let CertificatePolicies = CertificatePolicies_1 = class CertificatePolicies extends AsnArray {
  118. constructor(items) {
  119. super(items);
  120. Object.setPrototypeOf(this, CertificatePolicies_1.prototype);
  121. }
  122. };
  123. CertificatePolicies = CertificatePolicies_1 = __decorate([
  124. AsnType({
  125. type: AsnTypeTypes.Sequence,
  126. itemType: PolicyInformation,
  127. })
  128. ], CertificatePolicies);
  129. export { CertificatePolicies };