certificate_policies.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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, repeated: "sequence",
  48. })
  49. ], NoticeReference.prototype, "noticeNumbers", void 0);
  50. export class UserNotice {
  51. noticeRef;
  52. explicitText;
  53. constructor(params = {}) {
  54. Object.assign(this, params);
  55. }
  56. }
  57. __decorate([
  58. AsnProp({
  59. type: NoticeReference, optional: true,
  60. })
  61. ], UserNotice.prototype, "noticeRef", void 0);
  62. __decorate([
  63. AsnProp({
  64. type: DisplayText, optional: true,
  65. })
  66. ], UserNotice.prototype, "explicitText", void 0);
  67. let Qualifier = class Qualifier {
  68. cPSuri;
  69. userNotice;
  70. constructor(params = {}) {
  71. Object.assign(this, params);
  72. }
  73. };
  74. __decorate([
  75. AsnProp({ type: AsnPropTypes.IA5String })
  76. ], Qualifier.prototype, "cPSuri", void 0);
  77. __decorate([
  78. AsnProp({ type: UserNotice })
  79. ], Qualifier.prototype, "userNotice", void 0);
  80. Qualifier = __decorate([
  81. AsnType({ type: AsnTypeTypes.Choice })
  82. ], Qualifier);
  83. export { Qualifier };
  84. export class PolicyQualifierInfo {
  85. policyQualifierId = "";
  86. qualifier = new ArrayBuffer(0);
  87. constructor(params = {}) {
  88. Object.assign(this, params);
  89. }
  90. }
  91. __decorate([
  92. AsnProp({ type: AsnPropTypes.ObjectIdentifier })
  93. ], PolicyQualifierInfo.prototype, "policyQualifierId", void 0);
  94. __decorate([
  95. AsnProp({ type: AsnPropTypes.Any })
  96. ], PolicyQualifierInfo.prototype, "qualifier", void 0);
  97. export class PolicyInformation {
  98. policyIdentifier = "";
  99. policyQualifiers;
  100. constructor(params = {}) {
  101. Object.assign(this, params);
  102. }
  103. }
  104. __decorate([
  105. AsnProp({ type: AsnPropTypes.ObjectIdentifier })
  106. ], PolicyInformation.prototype, "policyIdentifier", void 0);
  107. __decorate([
  108. AsnProp({
  109. type: PolicyQualifierInfo, repeated: "sequence", optional: true,
  110. })
  111. ], PolicyInformation.prototype, "policyQualifiers", void 0);
  112. let CertificatePolicies = CertificatePolicies_1 = class CertificatePolicies extends AsnArray {
  113. constructor(items) {
  114. super(items);
  115. Object.setPrototypeOf(this, CertificatePolicies_1.prototype);
  116. }
  117. };
  118. CertificatePolicies = CertificatePolicies_1 = __decorate([
  119. AsnType({
  120. type: AsnTypeTypes.Sequence, itemType: PolicyInformation,
  121. })
  122. ], CertificatePolicies);
  123. export { CertificatePolicies };