name_constraints.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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";
  5. import { id_ce } from "../object_identifiers";
  6. export const id_ce_nameConstraints = `${id_ce}.30`;
  7. export class GeneralSubtree {
  8. constructor(params = {}) {
  9. this.base = new GeneralName();
  10. this.minimum = 0;
  11. Object.assign(this, params);
  12. }
  13. }
  14. __decorate([
  15. AsnProp({ type: GeneralName })
  16. ], GeneralSubtree.prototype, "base", void 0);
  17. __decorate([
  18. AsnProp({ type: AsnPropTypes.Integer, context: 0, defaultValue: 0, implicit: true })
  19. ], GeneralSubtree.prototype, "minimum", void 0);
  20. __decorate([
  21. AsnProp({ type: AsnPropTypes.Integer, context: 1, optional: true, implicit: true })
  22. ], GeneralSubtree.prototype, "maximum", void 0);
  23. let GeneralSubtrees = GeneralSubtrees_1 = class GeneralSubtrees extends AsnArray {
  24. constructor(items) {
  25. super(items);
  26. Object.setPrototypeOf(this, GeneralSubtrees_1.prototype);
  27. }
  28. };
  29. GeneralSubtrees = GeneralSubtrees_1 = __decorate([
  30. AsnType({ type: AsnTypeTypes.Sequence, itemType: GeneralSubtree })
  31. ], GeneralSubtrees);
  32. export { GeneralSubtrees };
  33. export class NameConstraints {
  34. constructor(params = {}) {
  35. Object.assign(this, params);
  36. }
  37. }
  38. __decorate([
  39. AsnProp({ type: GeneralSubtrees, context: 0, optional: true, implicit: true })
  40. ], NameConstraints.prototype, "permittedSubtrees", void 0);
  41. __decorate([
  42. AsnProp({ type: GeneralSubtrees, context: 1, optional: true, implicit: true })
  43. ], NameConstraints.prototype, "excludedSubtrees", void 0);