add equality check for nonce and remote nonce

pull/292/head
zelig 10 years ago committed by Felix Lange
parent 2e868566d7
commit 923504ce3d
  1. 6
      p2p/crypto_test.go

@ -38,6 +38,12 @@ func TestCryptoHandshake(t *testing.T) {
fmt.Printf("%x\n%x\n%x\n%x\n%x\n%x\n%x\n%x\n%x\n%x\n", auth, initNonce, response, remoteRecNonce, remoteInitNonce, remoteRandomPubKey, recNonce, &randomPrivKey.PublicKey, initSessionToken, initSecretRW)
if !bytes.Equal(initNonce, remoteInitNonce) {
t.Errorf("nonces do not match")
}
if !bytes.Equal(recNonce, remoteRecNonce) {
t.Errorf("receiver nonces do not match")
}
if !bytes.Equal(initSessionToken, recSessionToken) {
t.Errorf("session tokens do not match")
}

Loading…
Cancel
Save