mirror of
https://github.com/asmogo/nws.git
synced 2025-01-19 02:21:32 +00:00
Extend certificate validity to 10 years
This commit is contained in:
parent
e6d48a6422
commit
588b0ad645
@ -125,7 +125,7 @@ func (e *Exit) StartReverseProxy(httpTarget string, port int32) error {
|
|||||||
func (e *Exit) createAndStoreCertificateData(ctx context.Context) (*tls.Certificate, error) {
|
func (e *Exit) createAndStoreCertificateData(ctx context.Context) (*tls.Certificate, error) {
|
||||||
priv, _ := rsa.GenerateKey(rand.Reader, 2048)
|
priv, _ := rsa.GenerateKey(rand.Reader, 2048)
|
||||||
notBefore := time.Now()
|
notBefore := time.Now()
|
||||||
notAfter := notBefore.Add(365 * 24 * time.Hour)
|
notAfter := notBefore.Add(10 * 365 * 24 * time.Hour)
|
||||||
serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
|
serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
|
||||||
serialNumber, _ := rand.Int(rand.Reader, serialNumberLimit)
|
serialNumber, _ := rand.Int(rand.Reader, serialNumberLimit)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user