mirror of
https://github.com/libp2p/go-libp2p-core.git
synced 2025-03-13 11:00:10 +08:00
Rename constant for weak RSA key environment variable
This commit is contained in:
parent
d95ff26e5e
commit
f1175dbc91
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user