mirror of
https://github.com/mumble-voip/grumble.git
synced 2026-01-26 05:19:10 -08:00
4096-bit RSA keys by default. Auto-regen keys if a cert or key is missing.
This commit is contained in:
parent
3014d5fe39
commit
53db9cd2fb
3 changed files with 34 additions and 22 deletions
|
|
@ -17,7 +17,7 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
// Generate a 2048-bit RSA keypair and a Grumble auto-generated X509
|
||||
// Generate a 4096-bit RSA keypair and a Grumble auto-generated X509
|
||||
// certificate. Output PEM-encoded DER representations of the resulting
|
||||
// certificate and private key to certpath and keypath.
|
||||
func GenerateSelfSignedCert(certpath, keypath string) (err error) {
|
||||
|
|
@ -34,7 +34,7 @@ func GenerateSelfSignedCert(certpath, keypath string) (err error) {
|
|||
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
|
||||
}
|
||||
|
||||
priv, err := rsa.GenerateKey(rand.Reader, 2048)
|
||||
priv, err := rsa.GenerateKey(rand.Reader, 4096)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue