From f1175dbc91555104aae7371c2328e7146cb2cc0b Mon Sep 17 00:00:00 2001 From: Cole Brown Date: Thu, 1 Aug 2019 19:05:47 -0400 Subject: [PATCH] Rename constant for weak RSA key environment variable --- crypto/rsa_common.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/rsa_common.go b/crypto/rsa_common.go index 9293159..c7e3054 100644 --- a/crypto/rsa_common.go +++ b/crypto/rsa_common.go @@ -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 }