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-kad-dht
Commits
2db9d18d
Commit
2db9d18d
authored
Aug 02, 2019
by
Cole Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use 2048 bit RSA keys in tests
parent
889386fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
13 deletions
+2
-13
README.md
README.md
+0
-11
records_test.go
records_test.go
+2
-2
No files found.
README.md
View file @
2db9d18d
...
...
@@ -22,17 +22,6 @@
go get github.com/libp2p/go-libp2p-kad-dht
```
## Running Tests
This package depends on tests that require crypto keys too large to inline into
a peer ID. These tests generate 512bit RSA keys for speed purposes. To run
these tests successfully, you must set the environment variable
`LIBP2P_ALLOW_WEAK_RSA_KEYS`
to any non-empty value, e.g.
`1`
.
```
bash
$ LIBP2P_ALLOW_WEAK_RSA_KEYS
=
1 go
test
```
## Usage
Go to https://godoc.org/github.com/libp2p/go-libp2p-kad-dht.
...
...
records_test.go
View file @
2db9d18d
...
...
@@ -150,7 +150,7 @@ func TestPubkeyNotFound(t *testing.T) {
connect
(
t
,
ctx
,
dhtA
,
dhtB
)
r
:=
u
.
NewSeededRand
(
15
)
// generate deterministic keypair
_
,
pubk
,
err
:=
ci
.
GenerateKeyPairWithReader
(
ci
.
RSA
,
512
,
r
)
_
,
pubk
,
err
:=
ci
.
GenerateKeyPairWithReader
(
ci
.
RSA
,
2048
,
r
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
@@ -181,7 +181,7 @@ func TestPubkeyBadKeyFromDHT(t *testing.T) {
connect
(
t
,
ctx
,
dhtA
,
dhtB
)
_
,
pk
,
err
:=
test
.
RandTestKeyPair
(
ci
.
RSA
,
512
)
_
,
pk
,
err
:=
test
.
RandTestKeyPair
(
ci
.
RSA
,
2048
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
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