Commit f1175dbc authored by Cole Brown's avatar Cole Brown

Rename constant for weak RSA key environment variable

parent d95ff26e
...@@ -5,10 +5,10 @@ import ( ...@@ -5,10 +5,10 @@ import (
"os" "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 // minimum required bits of RSA keys to 512. This should be used exclusively in
// test situations. // test situations.
const UnsafeRsaKeyEnv = "LIBP2P_ALLOW_WEAK_RSA_KEYS" const WeakRsaKeyEnv = "LIBP2P_ALLOW_WEAK_RSA_KEYS"
var MinRsaKeyBits = 2048 var MinRsaKeyBits = 2048
...@@ -17,7 +17,7 @@ var MinRsaKeyBits = 2048 ...@@ -17,7 +17,7 @@ var MinRsaKeyBits = 2048
var ErrRsaKeyTooSmall error var ErrRsaKeyTooSmall error
func init() { func init() {
if _, ok := os.LookupEnv(UnsafeRsaKeyEnv); ok { if _, ok := os.LookupEnv(WeakRsaKeyEnv); ok {
MinRsaKeyBits = 512 MinRsaKeyBits = 512
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment