Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
42729256
Commit
42729256
authored
Apr 20, 2017
by
Luca Boccassi
Committed by
GitHub
Apr 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2541 from garlick/gssapi_fix
fix misc. bugs in GSSAPI support
parents
aa90863b
2b9a352a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
11 deletions
+17
-11
configure.ac
configure.ac
+2
-1
zmq_gssapi.txt
doc/zmq_gssapi.txt
+9
-8
gssapi_client.cpp
src/gssapi_client.cpp
+5
-1
gssapi_mechanism_base.cpp
src/gssapi_mechanism_base.cpp
+1
-1
No files found.
configure.ac
View file @
42729256
...
...
@@ -427,7 +427,8 @@ AC_ARG_WITH([libgssapi_krb5], [AS_HELP_STRING([--with-libgssapi_krb5],
# conditionally require libgssapi_krb5
if test "x$require_libgssapi_krb5_ext" != "xno"; then
AC_CHECK_HEADERS(gssapi/gssapi_generic.h)
AC_SEARCH_LIBS([gss_init_sec_context], [gssapi_krb5 gssapi],,
AC_SEARCH_LIBS([gss_init_sec_context], [gssapi_krb5 gssapi],
AC_DEFINE(HAVE_LIBGSSAPI_KRB5, [1], [Enabled GSSAPI security]),
AC_MSG_ERROR(libgssapi_krb5 is needed for GSSAPI security))
fi
...
...
doc/zmq_gssapi.txt
View file @
42729256
...
...
@@ -22,16 +22,17 @@ CLIENT AND SERVER ROLES
-----------------------
A socket using GSSAPI can be either client or server, but not both.
To become either a GSSAPI client or server, the application sets the
ZMQ_GSSAPI_PRINCIPAL option to provide the socket with the name of the principal
for whom GSSAPI credentials should be acquired.
To become a GSSAPI server, the application sets the ZMQ_GSSAPI_SERVER
option on the socket.
To become a GSSAPI server, the application additionally sets the
ZMQ_GSSAPI_SERVER option on the socket.
To become a GSSAPI client, the application sets the ZMQ_GSSAPI_SERVICE_PRINCIPAL
option to the name of the principal on the server to which it intends to
connect.
To become a GSSAPI client, the application additionally sets the
ZMQ_GSSAPI_SERVICE_PRINCIPAL option to the name of the principal of the server
to which it intends to connect.
On client or server, the application may additionally set the
ZMQ_GSSAPI_PRINCIPAL option to provide the socket with the name of the
principal for whom GSSAPI credentials should be acquired. If this option
is not set, default credentials are used.
OPTIONAL ENCRYPTION
...
...
src/gssapi_client.cpp
View file @
42729256
...
...
@@ -166,10 +166,14 @@ zmq::mechanism_t::status_t zmq::gssapi_client_t::status () const
int
zmq
::
gssapi_client_t
::
initialize_context
()
{
// principal was specified but credentials could not be acquired
if
(
principal_name
!=
NULL
&&
cred
==
NULL
)
return
-
1
;
// First time through, import service_name into target_name
if
(
target_name
==
GSS_C_NO_NAME
)
{
send_tok
.
value
=
service_name
;
send_tok
.
length
=
strlen
(
service_name
);
send_tok
.
length
=
strlen
(
service_name
)
+
1
;
OM_uint32
maj
=
gss_import_name
(
&
min_stat
,
&
send_tok
,
GSS_C_NT_HOSTBASED_SERVICE
,
&
target_name
);
...
...
src/gssapi_mechanism_base.cpp
View file @
42729256
...
...
@@ -338,7 +338,7 @@ int zmq::gssapi_mechanism_base_t::acquire_credentials (char * service_name_, gss
return
-
1
;
maj_stat
=
gss_acquire_cred
(
&
min_stat
,
server_name
,
0
,
GSS_C_NO_OID_SET
,
GSS_C_
ACCEPT
,
GSS_C_NO_OID_SET
,
GSS_C_
BOTH
,
cred_
,
NULL
,
NULL
);
if
(
maj_stat
!=
GSS_S_COMPLETE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment