Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
set an actual NotBefore time on the certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Nov 23, 2021
1 parent c248f7a commit 22da1a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func keyToCertificate(sk ic.PrivKey) (*tls.Certificate, error) {
}
tmpl := &x509.Certificate{
SerialNumber: sn,
NotBefore: time.Time{},
NotBefore: time.Now().Add(-time.Hour),
NotAfter: time.Now().Add(certValidityPeriod),
// According to RFC 3280, the issuer field must be set,
// see https://datatracker.ietf.org/doc/html/rfc3280#section-4.1.2.4.
Expand Down

0 comments on commit 22da1a4

Please sign in to comment.