This commit is contained in:
simonzhangsz committed 2023-08-23 13:21:57 +08:00
1 parent 7bed672080
commit 2a9ea8dc80
1 file changed
+1
+1
View File
@@ -25,6 +25,7 @@ func main() {
SerialNumber: big.NewInt(2023), SerialNumber: big.NewInt(2023),
Subject: pkix.Name{CommonName: "Root CA"}, Subject: pkix.Name{CommonName: "Root CA"},
NotBefore: time.Now(), NotBefore: time.Now(),
//NotAfter: time.Now().AddDate(10, 0, 0), // 有效期为10年
NotAfter: time.Now().AddDate(0, 0, 1), // 有效期为10年 NotAfter: time.Now().AddDate(0, 0, 1), // 有效期为10年
KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageCRLSign, KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageCRLSign,
BasicConstraintsValid: true, BasicConstraintsValid: true,