src/gssapi_client.cpp

This commit is contained in:
Chris Laws
2014-04-25 13:47:07 +09:30
parent dd64f6432c
commit 09647fa916
6 changed files with 56 additions and 33 deletions

View File

@@ -20,6 +20,8 @@
#ifndef __ZMQ_GSSAPI_CLIENT_HPP_INCLUDED__
#define __ZMQ_GSSAPI_CLIENT_HPP_INCLUDED__
#ifdef HAVE_LIBGSSAPI_KRB5
#include "gssapi_mechanism_base.hpp"
namespace zmq
@@ -77,3 +79,5 @@ namespace zmq
}
#endif
#endif

View File

@@ -18,6 +18,9 @@
*/
#include "platform.hpp"
#ifdef HAVE_LIBGSSAPI_KRB5
#ifdef ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#endif
@@ -333,3 +336,4 @@ int zmq::gssapi_mechanism_base_t::acquire_credentials (char * service_name_, gss
return 0;
}
#endif

View File

@@ -20,6 +20,10 @@
#ifndef __ZMQ_GSSAPI_MECHANISM_BASE_HPP_INCLUDED__
#define __ZMQ_GSSAPI_MECHANISM_BASE_HPP_INCLUDED__
#include "platform.hpp"
#ifdef HAVE_LIBGSSAPI_KRB5
#include <gssapi/gssapi_generic.h>
#include <gssapi/gssapi_krb5.h>
@@ -113,3 +117,4 @@ namespace zmq
#endif
#endif

View File

@@ -18,6 +18,9 @@
*/
#include "platform.hpp"
#ifdef HAVE_LIBGSSAPI_KRB5
#ifdef ZMQ_HAVE_WINDOWS
#include "windows.hpp"
#endif
@@ -358,3 +361,4 @@ void zmq::gssapi_server_t::accept_context ()
}
}
#endif

View File

@@ -20,6 +20,8 @@
#ifndef __ZMQ_GSSAPI_SERVER_HPP_INCLUDED__
#define __ZMQ_GSSAPI_SERVER_HPP_INCLUDED__
#ifdef HAVE_LIBGSSAPI_KRB5
#include "gssapi_mechanism_base.hpp"
namespace zmq
@@ -80,3 +82,5 @@ namespace zmq
}
#endif
#endif

View File

@@ -595,6 +595,7 @@ bool zmq::stream_engine_t::handshake ()
alloc_assert (mechanism);
}
#endif
#ifdef HAVE_LIBGSSAPI_KRB5
else
if (memcmp (greeting_recv + 12, "GSSAPI\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 20) == 0) {
if (options.as_server)
@@ -604,6 +605,7 @@ bool zmq::stream_engine_t::handshake ()
mechanism = new (std::nothrow) gssapi_client_t (options);
alloc_assert (mechanism);
}
#endif
else {
error ();
return false;