validity.js 812 B

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Validity = void 0;
  4. const tslib_1 = require("tslib");
  5. const asn1_schema_1 = require("@peculiar/asn1-schema");
  6. const time_1 = require("./time");
  7. class Validity {
  8. constructor(params) {
  9. this.notBefore = new time_1.Time(new Date());
  10. this.notAfter = new time_1.Time(new Date());
  11. if (params) {
  12. this.notBefore = new time_1.Time(params.notBefore);
  13. this.notAfter = new time_1.Time(params.notAfter);
  14. }
  15. }
  16. }
  17. exports.Validity = Validity;
  18. tslib_1.__decorate([
  19. (0, asn1_schema_1.AsnProp)({ type: time_1.Time })
  20. ], Validity.prototype, "notBefore", void 0);
  21. tslib_1.__decorate([
  22. (0, asn1_schema_1.AsnProp)({ type: time_1.Time })
  23. ], Validity.prototype, "notAfter", void 0);