mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-30 13:47:13 +01:00
Merge pull request #695 from hurtonm/master
Stop curve handshake when cookie box verification fails
This commit is contained in:
@@ -371,7 +371,7 @@ int zmq::curve_server_t::process_initiate (msg_t *msg_)
|
|||||||
// Check cookie plain text is as expected [C' + s']
|
// Check cookie plain text is as expected [C' + s']
|
||||||
if (memcmp (cookie_plaintext + crypto_secretbox_ZEROBYTES, cn_client, 32)
|
if (memcmp (cookie_plaintext + crypto_secretbox_ZEROBYTES, cn_client, 32)
|
||||||
|| memcmp (cookie_plaintext + crypto_secretbox_ZEROBYTES + 32, cn_secret, 32)) {
|
|| memcmp (cookie_plaintext + crypto_secretbox_ZEROBYTES + 32, cn_secret, 32)) {
|
||||||
errno = EAGAIN;
|
errno = EPROTO;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user