gssapi_server.hpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MPL-2.0 */
2 
3 #ifndef __ZMQ_GSSAPI_SERVER_HPP_INCLUDED__
4 #define __ZMQ_GSSAPI_SERVER_HPP_INCLUDED__
5 
6 #ifdef HAVE_LIBGSSAPI_KRB5
7 
9 #include "zap_client.hpp"
10 
11 namespace zmq
12 {
13 class msg_t;
14 class session_base_t;
15 
16 class gssapi_server_t ZMQ_FINAL : public gssapi_mechanism_base_t,
17  public zap_client_t
18 {
19  public:
20  gssapi_server_t (session_base_t *session_,
21  const std::string &peer_address,
22  const options_t &options_);
23  ~gssapi_server_t () ZMQ_FINAL;
24 
25  // mechanism implementation
26  int next_handshake_command (msg_t *msg_) ZMQ_FINAL;
27  int process_handshake_command (msg_t *msg_) ZMQ_FINAL;
28  int encode (msg_t *msg_) ZMQ_FINAL;
29  int decode (msg_t *msg_) ZMQ_FINAL;
30  int zap_msg_available () ZMQ_FINAL;
31  status_t status () const ZMQ_FINAL;
32 
33  private:
34  enum state_t
35  {
36  send_next_token,
37  recv_next_token,
38  expect_zap_reply,
39  send_ready,
40  recv_ready,
41  connected
42  };
43 
44  session_base_t *const session;
45 
46  const std::string peer_address;
47 
48  // Current FSM state
49  state_t state;
50 
51  // True iff server considers the client authenticated
52  bool security_context_established;
53 
54  // The underlying mechanism type (ignored)
55  gss_OID doid;
56 
57  void accept_context ();
58  int produce_next_token (msg_t *msg_);
59  int process_next_token (msg_t *msg_);
60  void send_zap_request ();
61 };
62 }
63 
64 #endif
65 
66 #endif
benchmarks.python.py_benchmark.const
const
Definition: py_benchmark.py:14
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:3083
zmq
Definition: zmq.hpp:229
gssapi_mechanism_base.hpp
zap_client.hpp
ZMQ_FINAL
Definition: unittest_ip_resolver.cpp:26
options_
DebugStringOptions options_
Definition: src/google/protobuf/descriptor.cc:2410


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:53