Skip to content

Commit

Permalink
fix issue: #431 (ERR_CERT_VALIDITY_TOO_LONG)
Browse files Browse the repository at this point in the history
  • Loading branch information
xujinzheng authored and elazarl committed Oct 15, 2022
1 parent fbd10ff commit a0805db
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ func signHost(ca tls.Certificate, hosts []string) (cert *tls.Certificate, err er
if x509ca, err = x509.ParseCertificate(ca.Certificate[0]); err != nil {
return
}
start := time.Unix(0, 0)
end, err := time.Parse("2006-01-02", "2049-12-31")
if err != nil {
panic(err)
}

start := time.Unix(time.Now().Unix()-2592000, 0) // 2592000 = 30 day
end := time.Unix(time.Now().Unix()+31536000, 0) // 31536000 = 365 day

serial := big.NewInt(rand.Int63())
template := x509.Certificate{
Expand Down

0 comments on commit a0805db

Please sign in to comment.