Commit 07229c72 authored by Joe Eli McIlvain's avatar Joe Eli McIlvain

Merge pull request #1280 from hintjens/master

Problem: very hard to debug security mechanism mismatch
parents 187c7438 17937ffc
......@@ -660,6 +660,18 @@ bool zmq::stream_engine_t::handshake ()
}
#endif
else {
// Temporary support for security debugging
char mechanism [21];
memcpy (mechanism, greeting_recv + 12, 20);
mechanism [20] = 0;
printf ("LIBZMQ I: security failure, self=%s peer=%s\n",
options.mechanism == ZMQ_NULL? "NULL":
options.mechanism == ZMQ_PLAIN? "PLAIN":
options.mechanism == ZMQ_CURVE? "CURVE":
options.mechanism == ZMQ_GSSAPI? "GSSAPI":
"OTHER",
mechanism);
error (protocol_error);
return false;
}
......
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