Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -3517,6 +3517,9 @@ added: v15.6.0

The date/time from which this certificate is valid.

If the certificate's `notBefore` time cannot be parsed, this is the string
`'Bad time value'`.

### `x509.validFromDate`

<!-- YAML
Expand All @@ -3529,6 +3532,16 @@ added:

The date/time from which this certificate is valid, encapsulated in a `Date` object.

If the certificate's `notBefore` time cannot be parsed, this property is an
invalid `Date` whose `getTime()` method returns `NaN`.

Relational comparisons with an invalid `Date` evaluate to `false`. To check
whether the current time is within the certificate's validity period, use
`now >= x509.validFromDate && now <= x509.validToDate`. This expression
evaluates to `false` if either date is invalid. Checking
`now < x509.validFromDate || now > x509.validToDate` instead can fail to
reject certificates with invalid dates.

### `x509.validTo`

<!-- YAML
Expand All @@ -3539,6 +3552,9 @@ added: v15.6.0

The date/time until which this certificate is valid.

If the certificate's `notAfter` time cannot be parsed, this is the string
`'Bad time value'`.

### `x509.validToDate`

<!-- YAML
Expand All @@ -3551,6 +3567,16 @@ added:

The date/time until which this certificate is valid, encapsulated in a `Date` object.

If the certificate's `notAfter` time cannot be parsed, this property is an
invalid `Date` whose `getTime()` method returns `NaN`.

Relational comparisons with an invalid `Date` evaluate to `false`. To check
whether the current time is within the certificate's validity period, use
`now >= x509.validFromDate && now <= x509.validToDate`. This expression
evaluates to `false` if either date is invalid. Checking
`now < x509.validFromDate || now > x509.validToDate` instead can fail to
reject certificates with invalid dates.

### `x509.signature`

<!-- YAML
Expand Down
Loading