Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-core
Commits
f1175dbc
Commit
f1175dbc
authored
Aug 01, 2019
by
Cole Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename constant for weak RSA key environment variable
parent
d95ff26e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
crypto/rsa_common.go
crypto/rsa_common.go
+3
-3
No files found.
crypto/rsa_common.go
View file @
f1175dbc
...
@@ -5,10 +5,10 @@ import (
...
@@ -5,10 +5,10 @@ import (
"os"
"os"
)
)
//
Unsafe
RsaKeyEnv is an environment variable which, when set, lowers the
//
Weak
RsaKeyEnv 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
Unsafe
RsaKeyEnv
=
"LIBP2P_ALLOW_WEAK_RSA_KEYS"
const
Weak
RsaKeyEnv
=
"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
(
Unsafe
RsaKeyEnv
);
ok
{
if
_
,
ok
:=
os
.
LookupEnv
(
Weak
RsaKeyEnv
);
ok
{
MinRsaKeyBits
=
512
MinRsaKeyBits
=
512
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment