Skip to content

Commit

Permalink
Rename constant for weak RSA key environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
bigs committed Aug 1, 2019
1 parent 3cfa7ee commit b07ce71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/crypto/rsa_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
}

Expand Down

0 comments on commit b07ce71

Please sign in to comment.