Fix noise test
This commit is contained in:
parent
021724a535
commit
7f1c9d1cc2
|
@ -102,17 +102,19 @@ func TestNoiseHandshake(t *testing.T) {
|
||||||
|
|
||||||
t.Log("deriving keys")
|
t.Log("deriving keys")
|
||||||
|
|
||||||
key1 := peer1.BeginSymmetricSession()
|
err = peer1.BeginSymmetricSession()
|
||||||
key2 := peer2.BeginSymmetricSession()
|
if err != nil {
|
||||||
|
t.Fatal("failed to derive keypair for peer 1", err)
|
||||||
if key1 == nil {
|
|
||||||
t.Fatal("failed to dervice keypair for peer 1")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if key2 == nil {
|
err = peer2.BeginSymmetricSession()
|
||||||
t.Fatal("failed to dervice keypair for peer 2")
|
if err != nil {
|
||||||
|
t.Fatal("failed to derive keypair for peer 2", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
key1 := peer1.keypairs.next
|
||||||
|
key2 := peer2.keypairs.current
|
||||||
|
|
||||||
// encrypting / decryption test
|
// encrypting / decryption test
|
||||||
|
|
||||||
t.Log("test key pairs")
|
t.Log("test key pairs")
|
||||||
|
|
Loading…
Reference in a new issue