validity.js 582 B

12345678910111213141516171819
  1. import { __decorate } from "tslib";
  2. import { AsnProp } from "@peculiar/asn1-schema";
  3. import { Time } from "./time";
  4. export class Validity {
  5. constructor(params) {
  6. this.notBefore = new Time(new Date());
  7. this.notAfter = new Time(new Date());
  8. if (params) {
  9. this.notBefore = new Time(params.notBefore);
  10. this.notAfter = new Time(params.notAfter);
  11. }
  12. }
  13. }
  14. __decorate([
  15. AsnProp({ type: Time })
  16. ], Validity.prototype, "notBefore", void 0);
  17. __decorate([
  18. AsnProp({ type: Time })
  19. ], Validity.prototype, "notAfter", void 0);