Open
Description
I'm creating certificates with expiry dates in the far future.
import * as x509 from '@peculiar/x509'
const selfCert = await x509.X509CertificateGenerator.createSelfSigned({
notBefore: new Date(now - CERT_VALIDITY_PERIOD_FROM),
notAfter: new Date(now + CERT_VALIDITY_PERIOD_TO),
//... other params
})
Trying to use them over TLS results in errors on the remote like:
failed to negotiate security protocol: tls: failed to parse certificate from server: x509: malformed GeneralizedTime
From what I understand X.509 has two time representations, UTCTime if the date is 2049 or earlier, and GeneralizedTime if the date is 2050 or later.
If I make the expiry date before 2049 everything works as expected.
Could this module be representing everything as UTCTime
?
Metadata
Assignees
Labels
No labels
Activity