mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-23 08:31:46 +02:00
Fixed ZAP authentication
- if ZAP server returns anything except 200, connection is closed - all security tests now pass correctly - test_security_curve now does proper client key authentication using test key - test_security_plain now does proper password authentication
This commit is contained in:
@@ -588,24 +588,28 @@ int zmq::curve_server_t::receive_and_process_zap_reply ()
|
||||
|
||||
// Address delimiter frame
|
||||
if (msg [0].size () > 0) {
|
||||
rc = -1;
|
||||
errno = EPROTO;
|
||||
goto error;
|
||||
}
|
||||
|
||||
// Version frame
|
||||
if (msg [1].size () != 3 || memcmp (msg [1].data (), "1.0", 3)) {
|
||||
rc = -1;
|
||||
errno = EPROTO;
|
||||
goto error;
|
||||
}
|
||||
|
||||
// Request id frame
|
||||
if (msg [2].size () != 1 || memcmp (msg [2].data (), "1", 1)) {
|
||||
rc = -1;
|
||||
errno = EPROTO;
|
||||
goto error;
|
||||
}
|
||||
|
||||
// Status code frame
|
||||
if (msg [3].size () != 3 || memcmp (msg [3].data (), "200", 3)) {
|
||||
rc = -1;
|
||||
errno = EACCES;
|
||||
goto error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user