name_constraints.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. var GeneralSubtrees_1;
  2. import { __decorate } from "tslib";
  3. import { AsnProp, AsnPropTypes, AsnArray, AsnType, AsnTypeTypes, } from "@peculiar/asn1-schema";
  4. import { GeneralName } from "../general_name.js";
  5. import { id_ce } from "../object_identifiers.js";
  6. export const id_ce_nameConstraints = `${id_ce}.30`;
  7. export class GeneralSubtree {
  8. base = new GeneralName();
  9. minimum = 0;
  10. maximum;
  11. constructor(params = {}) {
  12. Object.assign(this, params);
  13. }
  14. }
  15. __decorate([
  16. AsnProp({ type: GeneralName })
  17. ], GeneralSubtree.prototype, "base", void 0);
  18. __decorate([
  19. AsnProp({
  20. type: AsnPropTypes.Integer, context: 0, defaultValue: 0, implicit: true,
  21. })
  22. ], GeneralSubtree.prototype, "minimum", void 0);
  23. __decorate([
  24. AsnProp({
  25. type: AsnPropTypes.Integer, context: 1, optional: true, implicit: true,
  26. })
  27. ], GeneralSubtree.prototype, "maximum", void 0);
  28. let GeneralSubtrees = GeneralSubtrees_1 = class GeneralSubtrees extends AsnArray {
  29. constructor(items) {
  30. super(items);
  31. Object.setPrototypeOf(this, GeneralSubtrees_1.prototype);
  32. }
  33. };
  34. GeneralSubtrees = GeneralSubtrees_1 = __decorate([
  35. AsnType({
  36. type: AsnTypeTypes.Sequence, itemType: GeneralSubtree,
  37. })
  38. ], GeneralSubtrees);
  39. export { GeneralSubtrees };
  40. export class NameConstraints {
  41. permittedSubtrees;
  42. excludedSubtrees;
  43. constructor(params = {}) {
  44. Object.assign(this, params);
  45. }
  46. }
  47. __decorate([
  48. AsnProp({
  49. type: GeneralSubtrees, context: 0, optional: true, implicit: true,
  50. })
  51. ], NameConstraints.prototype, "permittedSubtrees", void 0);
  52. __decorate([
  53. AsnProp({
  54. type: GeneralSubtrees, context: 1, optional: true, implicit: true,
  55. })
  56. ], NameConstraints.prototype, "excludedSubtrees", void 0);