Commit c191909c authored by Simon Giesecke's avatar Simon Giesecke Committed by Luca Boccassi

Problem: Misleading error code in case ZAP handler sends an invalid status code (#2646)

Solution: Use EPROTO instead of EACCES error code in that case
parent 5d4e30eb
......@@ -317,7 +317,7 @@ int zmq::curve_server_t::process_hello (msg_t *msg_)
hello_nonce, cn_client, secret_key);
if (rc != 0) {
// CURVE I: cannot open client HELLO -- wrong server key?
current_error_detail = encryption;
current_error_detail = encryption;
errno = EPROTO;
return -1;
}
......@@ -709,7 +709,7 @@ int zmq::curve_server_t::receive_and_process_zap_reply ()
if (msg [3].size () != 3) {
// CURVE I: ZAP handler sent invalid status code
current_error_detail = zap;
errno = EACCES;
errno = EPROTO;
return close_and_return (msg, -1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment