fix: 解决自签证书火狐浏览器报错的问题 (#4926)

Refs https://github.com/1Panel-dev/1Panel/issues/4927
pull/4932/head
zhengkunwang 2024-05-08 18:48:23 +08:00 committed by GitHub
parent 0fa027d01d
commit c6e1bb5245
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ func (w WebsiteCAService) Create(create request.WebsiteCACreate) (*request.Websi
}
rootCA := &x509.Certificate{
SerialNumber: big.NewInt(time.Now().Unix()),
SerialNumber: big.NewInt(time.Now().Unix() + 1),
Subject: pkixName,
NotBefore: time.Now(),
NotAfter: time.Now().AddDate(10, 0, 0),
@ -279,7 +279,7 @@ func (w WebsiteCAService) ObtainSSL(req request.WebsiteCAObtain) (*model.Website
notAfter = notAfter.AddDate(0, 0, req.Time)
}
interCsr := &x509.Certificate{
SerialNumber: big.NewInt(time.Now().Unix()),
SerialNumber: big.NewInt(time.Now().Unix() + 2),
Subject: rootCsr.Subject,
NotBefore: time.Now(),
NotAfter: notAfter,
@ -315,7 +315,7 @@ func (w WebsiteCAService) ObtainSSL(req request.WebsiteCAObtain) (*model.Website
subject := rootCsr.Subject
subject.CommonName = commonName
csr := &x509.Certificate{
SerialNumber: big.NewInt(time.Now().Unix()),
SerialNumber: big.NewInt(time.Now().Unix() + 3),
Subject: subject,
NotBefore: time.Now(),
NotAfter: notAfter,