UNPKG

@peculiar/asn1-x509

Version:

ASN.1 schema for X.509 certificates, certificate revocation lists, and related profile structures defined in RFC 5280.

20 lines (19 loc) 567 B
import { __decorate } from "tslib"; import { AsnProp } from "@peculiar/asn1-schema"; import { Time } from "./time.js"; export class Validity { notBefore = new Time(new Date()); notAfter = new Time(new Date()); constructor(params) { if (params) { this.notBefore = new Time(params.notBefore); this.notAfter = new Time(params.notAfter); } } } __decorate([ AsnProp({ type: Time }) ], Validity.prototype, "notBefore", void 0); __decorate([ AsnProp({ type: Time }) ], Validity.prototype, "notAfter", void 0);