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
2e1645a5
Commit
2e1645a5
authored
Apr 23, 2014
by
Chris Busbey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
principle->principal
parent
87834dd6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
42 deletions
+42
-42
zmq.h
include/zmq.h
+2
-2
gssapi_client.cpp
src/gssapi_client.cpp
+8
-8
gssapi_client.hpp
src/gssapi_client.hpp
+1
-1
gssapi_mechanism_base.cpp
src/gssapi_mechanism_base.cpp
+1
-1
gssapi_mechanism_base.hpp
src/gssapi_mechanism_base.hpp
+3
-3
gssapi_server.cpp
src/gssapi_server.cpp
+12
-12
options.cpp
src/options.cpp
+12
-12
options.hpp
src/options.hpp
+3
-3
No files found.
include/zmq.h
View file @
2e1645a5
...
...
@@ -297,8 +297,8 @@ ZMQ_EXPORT char *zmq_msg_gets (zmq_msg_t *msg, char *property);
#define ZMQ_IPC_FILTER_GID 60
#define ZMQ_CONNECT_RID 61
#define ZMQ_GSSAPI_SERVER 62
#define ZMQ_GSSAPI_PRINCIP
LE
63
#define ZMQ_GSSAPI_SERVICE_PRINCIP
LE
64
#define ZMQ_GSSAPI_PRINCIP
AL
63
#define ZMQ_GSSAPI_SERVICE_PRINCIP
AL
64
/* Message options */
#define ZMQ_MORE 1
...
...
src/gssapi_client.cpp
View file @
2e1645a5
...
...
@@ -38,20 +38,20 @@ zmq::gssapi_client_t::gssapi_client_t (const options_t &options_) :
mechs
(),
security_context_established
(
false
)
{
const
std
::
string
::
size_type
service_size
=
options_
.
gss_service_princip
le
.
size
();
const
std
::
string
::
size_type
service_size
=
options_
.
gss_service_princip
al
.
size
();
service_name
=
static_cast
<
char
*>
(
malloc
(
service_size
+
1
));
assert
(
service_name
);
memcpy
(
service_name
,
options_
.
gss_service_princip
le
.
c_str
(),
service_size
+
1
);
memcpy
(
service_name
,
options_
.
gss_service_princip
al
.
c_str
(),
service_size
+
1
);
maj_stat
=
GSS_S_COMPLETE
;
if
(
!
options_
.
gss_princip
le
.
empty
())
if
(
!
options_
.
gss_princip
al
.
empty
())
{
const
std
::
string
::
size_type
princip
le_size
=
options_
.
gss_principle
.
size
();
princip
le_name
=
static_cast
<
char
*>
(
malloc
(
principle
_size
+
1
));
assert
(
princip
le
_name
);
memcpy
(
princip
le_name
,
options_
.
gss_principle
.
c_str
(),
principle
_size
+
1
);
const
std
::
string
::
size_type
princip
al_size
=
options_
.
gss_principal
.
size
();
princip
al_name
=
static_cast
<
char
*>
(
malloc
(
principal
_size
+
1
));
assert
(
princip
al
_name
);
memcpy
(
princip
al_name
,
options_
.
gss_principal
.
c_str
(),
principal
_size
+
1
);
if
(
acquire_credentials
(
princip
le
_name
,
&
cred
)
!=
0
)
if
(
acquire_credentials
(
princip
al
_name
,
&
cred
)
!=
0
)
maj_stat
=
GSS_S_FAILURE
;
}
...
...
src/gssapi_client.hpp
View file @
2e1645a5
...
...
@@ -53,7 +53,7 @@ namespace zmq
connected
};
// Human-readable princip
le
name of the service we are connecting to
// Human-readable princip
al
name of the service we are connecting to
char
*
service_name
;
// Current FSM state
...
...
src/gssapi_mechanism_base.cpp
View file @
2e1645a5
...
...
@@ -37,7 +37,7 @@ zmq::gssapi_mechanism_base_t::gssapi_mechanism_base_t (const options_t & options
recv_tok
(),
/// FIXME remove? in_buf (),
target_name
(
GSS_C_NO_NAME
),
princip
le
_name
(
NULL
),
princip
al
_name
(
NULL
),
maj_stat
(
GSS_S_COMPLETE
),
min_stat
(
0
),
init_sec_min_stat
(
0
),
...
...
src/gssapi_mechanism_base.hpp
View file @
2e1645a5
...
...
@@ -67,7 +67,7 @@ namespace zmq
// Acquire security context credentials from the
// underlying mechanism.
static
int
acquire_credentials
(
char
*
princip
le
_name_
,
static
int
acquire_credentials
(
char
*
princip
al
_name_
,
gss_cred_id_t
*
cred_
);
protected
:
...
...
@@ -77,11 +77,11 @@ namespace zmq
// Opaque GSSAPI token for incoming data
gss_buffer_desc
recv_tok
;
// Opaque GSSAPI representation of princip
le
// Opaque GSSAPI representation of princip
al
gss_name_t
target_name
;
// Human-readable principal name
char
*
princip
le
_name
;
char
*
princip
al
_name
;
// Status code returned by GSSAPI functions
OM_uint32
maj_stat
;
...
...
src/gssapi_server.cpp
View file @
2e1645a5
...
...
@@ -44,14 +44,14 @@ zmq::gssapi_server_t::gssapi_server_t (session_base_t *session_,
security_context_established
(
false
)
{
maj_stat
=
GSS_S_CONTINUE_NEEDED
;
if
(
!
options_
.
gss_princip
le
.
empty
())
if
(
!
options_
.
gss_princip
al
.
empty
())
{
const
std
::
string
::
size_type
princip
le_size
=
options_
.
gss_principle
.
size
();
princip
le_name
=
static_cast
<
char
*>
(
malloc
(
principle
_size
+
1
));
assert
(
princip
le
_name
);
memcpy
(
princip
le_name
,
options_
.
gss_principle
.
c_str
(),
principle
_size
+
1
);
const
std
::
string
::
size_type
princip
al_size
=
options_
.
gss_principal
.
size
();
princip
al_name
=
static_cast
<
char
*>
(
malloc
(
principal
_size
+
1
));
assert
(
princip
al
_name
);
memcpy
(
princip
al_name
,
options_
.
gss_principal
.
c_str
(),
principal
_size
+
1
);
if
(
acquire_credentials
(
princip
le
_name
,
&
cred
)
!=
0
)
if
(
acquire_credentials
(
princip
al
_name
,
&
cred
)
!=
0
)
maj_stat
=
GSS_S_FAILURE
;
}
}
...
...
@@ -199,16 +199,16 @@ void zmq::gssapi_server_t::send_zap_request ()
rc
=
session
->
write_zap_msg
(
&
msg
);
errno_assert
(
rc
==
0
);
//
Principle
frame
gss_buffer_desc
princip
le
;
gss_display_name
(
&
min_stat
,
target_name
,
&
princip
le
,
NULL
);
//
Principal
frame
gss_buffer_desc
princip
al
;
gss_display_name
(
&
min_stat
,
target_name
,
&
princip
al
,
NULL
);
rc
=
msg
.
init_size
(
princip
le
.
length
);
rc
=
msg
.
init_size
(
princip
al
.
length
);
errno_assert
(
rc
==
0
);
memcpy
(
msg
.
data
(),
princip
le
.
value
,
principle
.
length
);
memcpy
(
msg
.
data
(),
princip
al
.
value
,
principal
.
length
);
rc
=
session
->
write_zap_msg
(
&
msg
);
errno_assert
(
rc
==
0
);
gss_release_buffer
(
&
min_stat
,
&
princip
le
);
gss_release_buffer
(
&
min_stat
,
&
princip
al
);
}
int
zmq
::
gssapi_server_t
::
receive_and_process_zap_reply
()
...
...
src/options.cpp
View file @
2e1645a5
...
...
@@ -410,17 +410,17 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
}
break
;
case
ZMQ_GSSAPI_PRINCIP
LE
:
case
ZMQ_GSSAPI_PRINCIP
AL
:
if
(
optvallen_
>
0
&&
optvallen_
<
256
&&
optval_
!=
NULL
)
{
gss_princip
le
.
assign
((
const
char
*
)
optval_
,
optvallen_
);
gss_princip
al
.
assign
((
const
char
*
)
optval_
,
optvallen_
);
mechanism
=
ZMQ_GSSAPI
;
return
0
;
}
break
;
case
ZMQ_GSSAPI_SERVICE_PRINCIP
LE
:
case
ZMQ_GSSAPI_SERVICE_PRINCIP
AL
:
if
(
optvallen_
>
0
&&
optvallen_
<
256
&&
optval_
!=
NULL
)
{
gss_service_princip
le
.
assign
((
const
char
*
)
optval_
,
optvallen_
);
gss_service_princip
al
.
assign
((
const
char
*
)
optval_
,
optvallen_
);
mechanism
=
ZMQ_GSSAPI
;
as_server
=
0
;
return
0
;
...
...
@@ -714,18 +714,18 @@ int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
}
break
;
case
ZMQ_GSSAPI_PRINCIP
LE
:
if
(
*
optvallen_
>=
gss_princip
le
.
size
()
+
1
)
{
memcpy
(
optval_
,
gss_princip
le
.
c_str
(),
gss_principle
.
size
()
+
1
);
*
optvallen_
=
gss_princip
le
.
size
()
+
1
;
case
ZMQ_GSSAPI_PRINCIP
AL
:
if
(
*
optvallen_
>=
gss_princip
al
.
size
()
+
1
)
{
memcpy
(
optval_
,
gss_princip
al
.
c_str
(),
gss_principal
.
size
()
+
1
);
*
optvallen_
=
gss_princip
al
.
size
()
+
1
;
return
0
;
}
break
;
case
ZMQ_GSSAPI_SERVICE_PRINCIP
LE
:
if
(
*
optvallen_
>=
gss_service_princip
le
.
size
()
+
1
)
{
memcpy
(
optval_
,
gss_service_princip
le
.
c_str
(),
gss_service_principle
.
size
()
+
1
);
*
optvallen_
=
gss_service_princip
le
.
size
()
+
1
;
case
ZMQ_GSSAPI_SERVICE_PRINCIP
AL
:
if
(
*
optvallen_
>=
gss_service_princip
al
.
size
()
+
1
)
{
memcpy
(
optval_
,
gss_service_princip
al
.
c_str
(),
gss_service_principal
.
size
()
+
1
);
*
optvallen_
=
gss_service_princip
al
.
size
()
+
1
;
return
0
;
}
break
;
...
...
src/options.hpp
View file @
2e1645a5
...
...
@@ -156,9 +156,9 @@ namespace zmq
uint8_t
curve_secret_key
[
CURVE_KEYSIZE
];
uint8_t
curve_server_key
[
CURVE_KEYSIZE
];
// Princip
le
s for GSSAPI mechanism
std
::
string
gss_princip
le
;
std
::
string
gss_service_princip
le
;
// Princip
al
s for GSSAPI mechanism
std
::
string
gss_princip
al
;
std
::
string
gss_service_princip
al
;
// ID of the socket.
int
socket_id
;
...
...
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