Skip to content

Commit

Permalink
feat: 优化证书参数
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Jan 2, 2025
1 parent 818c5b4 commit 092da89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cert/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func GenerateSelfSigned(names []string) (cert []byte, key []byte, err error) {
SerialNumber: big.NewInt(1),
Subject: pkix.Name{CommonName: "Rat Panel Root CA"},
NotBefore: time.Now(),
NotAfter: time.Now().AddDate(25, 0, 0),
NotAfter: time.Now().AddDate(20, 0, 0),
BasicConstraintsValid: true,
IsCA: true,
KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageDigitalSignature,
Expand All @@ -141,7 +141,7 @@ func GenerateSelfSigned(names []string) (cert []byte, key []byte, err error) {
SerialNumber: big.NewInt(2),
Subject: pkix.Name{CommonName: "Rat Panel CA"},
NotBefore: time.Now(),
NotAfter: time.Now().AddDate(1, 1, 0),
NotAfter: time.Now().AddDate(3, 0, 0),
BasicConstraintsValid: true,
IsCA: true,
KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageDigitalSignature,
Expand All @@ -167,7 +167,7 @@ func GenerateSelfSigned(names []string) (cert []byte, key []byte, err error) {
SerialNumber: big.NewInt(3),
Subject: pkix.Name{CommonName: "Rat Panel"},
NotBefore: time.Now(),
NotAfter: time.Now().AddDate(1, 1, 0),
NotAfter: time.Now().AddDate(1, 0, 0),
KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth},
}
Expand Down

0 comments on commit 092da89

Please sign in to comment.