mirror of
https://github.com/fluencelabs/go-libp2p-kad-dht
synced 2025-04-24 22:32:13 +00:00
Use 2048 bit RSA keys in tests
This commit is contained in:
parent
889386fa7c
commit
2db9d18d58
11
README.md
11
README.md
@ -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.
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user