Rename constant for weak RSA key environment variable

This commit is contained in:
Cole Brown 2019-08-01 19:05:47 -04:00
parent d95ff26e5e
commit f1175dbc91

View File

@ -5,10 +5,10 @@ import (
"os"
)
// UnsafeRsaKeyEnv is an environment variable which, when set, lowers the
// WeakRsaKeyEnv is an environment variable which, when set, lowers the
// minimum required bits of RSA keys to 512. This should be used exclusively in
// test situations.
const UnsafeRsaKeyEnv = "LIBP2P_ALLOW_WEAK_RSA_KEYS"
const WeakRsaKeyEnv = "LIBP2P_ALLOW_WEAK_RSA_KEYS"
var MinRsaKeyBits = 2048
@ -17,7 +17,7 @@ var MinRsaKeyBits = 2048
var ErrRsaKeyTooSmall error
func init() {
if _, ok := os.LookupEnv(UnsafeRsaKeyEnv); ok {
if _, ok := os.LookupEnv(WeakRsaKeyEnv); ok {
MinRsaKeyBits = 512
}