Browse Source

Merge pull request #1580 from ethereum/p2p

Log message instead of assert for invalid auth payload.
cl-refactor
Gav Wood 10 years ago
parent
commit
eb9ef506b6
  1. 5
      libp2p/RLPxHandshake.cpp

5
libp2p/RLPxHandshake.cpp

@ -93,7 +93,10 @@ void RLPXHandshake::readAuth()
Secret sharedSecret;
crypto::ecdh::agree(m_host->m_alias.sec(), m_remote, sharedSecret);
m_remoteEphemeral = recover(*(Signature*)sig.data(), sharedSecret ^ m_remoteNonce);
assert(sha3(m_remoteEphemeral) == *(h256*)hepubk.data());
if (sha3(m_remoteEphemeral) != *(h256*)hepubk.data())
clog(NetConnect) << "p2p.connect.ingress auth failed (invalid: hash mismatch) for" << m_socket->remoteEndpoint();
transition();
}
else

Loading…
Cancel
Save