From c6e1bb52452433e983b2576db88718f5bb7d9da2 Mon Sep 17 00:00:00 2001 From: zhengkunwang <31820853+zhengkunwang223@users.noreply.github.com> Date: Wed, 8 May 2024 18:48:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E8=87=AA=E7=AD=BE?= =?UTF-8?q?=E8=AF=81=E4=B9=A6=E7=81=AB=E7=8B=90=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98=20(#4926)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs https://github.com/1Panel-dev/1Panel/issues/4927 --- backend/app/service/website_ca.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/service/website_ca.go b/backend/app/service/website_ca.go index 27142bc6e..ee41d086b 100644 --- a/backend/app/service/website_ca.go +++ b/backend/app/service/website_ca.go @@ -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,