mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-21 05:15:27 +08:00
fix: 解决自签证书火狐浏览器报错的问题 (#4926)
Refs https://github.com/1Panel-dev/1Panel/issues/4927
This commit is contained in:
parent
0fa027d01d
commit
c6e1bb5245
1 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ func (w WebsiteCAService) Create(create request.WebsiteCACreate) (*request.Websi
|
||||||
}
|
}
|
||||||
|
|
||||||
rootCA := &x509.Certificate{
|
rootCA := &x509.Certificate{
|
||||||
SerialNumber: big.NewInt(time.Now().Unix()),
|
SerialNumber: big.NewInt(time.Now().Unix() + 1),
|
||||||
Subject: pkixName,
|
Subject: pkixName,
|
||||||
NotBefore: time.Now(),
|
NotBefore: time.Now(),
|
||||||
NotAfter: time.Now().AddDate(10, 0, 0),
|
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)
|
notAfter = notAfter.AddDate(0, 0, req.Time)
|
||||||
}
|
}
|
||||||
interCsr := &x509.Certificate{
|
interCsr := &x509.Certificate{
|
||||||
SerialNumber: big.NewInt(time.Now().Unix()),
|
SerialNumber: big.NewInt(time.Now().Unix() + 2),
|
||||||
Subject: rootCsr.Subject,
|
Subject: rootCsr.Subject,
|
||||||
NotBefore: time.Now(),
|
NotBefore: time.Now(),
|
||||||
NotAfter: notAfter,
|
NotAfter: notAfter,
|
||||||
|
@ -315,7 +315,7 @@ func (w WebsiteCAService) ObtainSSL(req request.WebsiteCAObtain) (*model.Website
|
||||||
subject := rootCsr.Subject
|
subject := rootCsr.Subject
|
||||||
subject.CommonName = commonName
|
subject.CommonName = commonName
|
||||||
csr := &x509.Certificate{
|
csr := &x509.Certificate{
|
||||||
SerialNumber: big.NewInt(time.Now().Unix()),
|
SerialNumber: big.NewInt(time.Now().Unix() + 3),
|
||||||
Subject: subject,
|
Subject: subject,
|
||||||
NotBefore: time.Now(),
|
NotBefore: time.Now(),
|
||||||
NotAfter: notAfter,
|
NotAfter: notAfter,
|
||||||
|
|
Loading…
Reference in a new issue