mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-26 18:42:43 +01:00
Stubbed in gssapi security mechanism.
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include "v2_decoder.hpp"
|
||||
#include "null_mechanism.hpp"
|
||||
#include "plain_mechanism.hpp"
|
||||
#include "gssapi_mechanism.hpp"
|
||||
#include "curve_client.hpp"
|
||||
#include "curve_server.hpp"
|
||||
#include "raw_decoder.hpp"
|
||||
@@ -477,13 +478,17 @@ bool zmq::stream_engine_t::handshake ()
|
||||
|
||||
zmq_assert (options.mechanism == ZMQ_NULL
|
||||
|| options.mechanism == ZMQ_PLAIN
|
||||
|| options.mechanism == ZMQ_CURVE);
|
||||
|| options.mechanism == ZMQ_CURVE
|
||||
|| options.mechanism == ZMQ_GSSAPI);
|
||||
|
||||
if (options.mechanism == ZMQ_NULL)
|
||||
memcpy (outpos + outsize, "NULL", 4);
|
||||
else
|
||||
if (options.mechanism == ZMQ_PLAIN)
|
||||
memcpy (outpos + outsize, "PLAIN", 5);
|
||||
else
|
||||
if (options.mechanism == ZMQ_GSSAPI)
|
||||
memcpy (outpos + outsize, "GSSAPI", 6);
|
||||
else
|
||||
memcpy (outpos + outsize, "CURVE", 5);
|
||||
outsize += 20;
|
||||
@@ -589,6 +594,12 @@ bool zmq::stream_engine_t::handshake ()
|
||||
alloc_assert (mechanism);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
if (memcmp (greeting_recv + 12, "GSSAPI\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 20) == 0) {
|
||||
mechanism = new (std::nothrow)
|
||||
gssapi_mechanism_t (session, peer_address, options);
|
||||
alloc_assert (mechanism);
|
||||
}
|
||||
else {
|
||||
error ();
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user