mirror of
https://github.com/pion/webrtc.git
synced 2025-12-24 11:51:03 +08:00
Make default certificate lifetime 30 days
This matches the W3C spec for generateCertificate. In the future we will add an argument that lets the user pass a max of 1 year. Relates to c6c241
This commit is contained in:
@@ -147,7 +147,7 @@ func GenerateCertificate(secretKey crypto.PrivateKey) (*Certificate, error) {
|
||||
BasicConstraintsValid: true,
|
||||
NotBefore: time.Now(),
|
||||
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
|
||||
NotAfter: time.Now().AddDate(10, 0, 0),
|
||||
NotAfter: time.Now().AddDate(0, 1, 0),
|
||||
SerialNumber: serialNumber,
|
||||
Version: 2,
|
||||
Subject: pkix.Name{CommonName: hex.EncodeToString(origin)},
|
||||
|
||||
Reference in New Issue
Block a user