Rudiments
gssincludes.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#include <rudiments/object.h>
5
6#include <rudiments/securitycontext.h>
7#include <rudiments/stringbuffer.h>
8
9#if defined(RUDIMENTS_HAS_GSS)
10
11 #if defined(RUDIMENTS_HAS_GSSAPI_GSSAPI_H)
12 #include <gssapi/gssapi.h>
13 #elif defined(RUDIMENTS_HAS_GSSAPI_H)
14 #include <gssapi.h>
15 #endif
16
17#elif defined(RUDIMENTS_HAS_SSPI)
18
19 #ifdef RUDIMENTS_HAVE_WINSOCK2_H
20 #include <winsock2.h>
21 #endif
22
23 // must be included after winsock2.h
24 #ifdef RUDIMENTS_HAVE_WINDOWS_H
25 #include <windows.h>
26 #endif
27
28 #define SECURITY_WIN32
29 #include <security.h>
30
31 // map some GSS flags
32 #define GSS_C_DELEG_FLAG ISC_REQ_DELEGATE
33 #define GSS_C_MUTUAL_FLAG ISC_REQ_MUTUAL_AUTH
34 #define GSS_C_REPLAY_FLAG ISC_REQ_REPLAY_DETECT
35 #define GSS_C_SEQUENCE_FLAG ISC_REQ_SEQUENCE_DETECT
36 #define GSS_C_CONF_FLAG ISC_REQ_CONFIDENTIALITY
37 #define GSS_C_INTEG_FLAG ISC_REQ_INTEGRITY
38 #define GSS_C_ANON_FLAG 0
39 #define GSS_C_PROT_READY_FLAG 0
40 #define GSS_C_TRANS_FLAG 0
41 #define GSS_C_DELEG_POLICY_FLAG 0
42
43#else
44
45 // map some GSS flags
46 #define GSS_C_DELEG_FLAG 0
47 #define GSS_C_MUTUAL_FLAG 0
48 #define GSS_C_REPLAY_FLAG 0
49 #define GSS_C_SEQUENCE_FLAG 0
50 #define GSS_C_CONF_FLAG 0
51 #define GSS_C_INTEG_FLAG 0
52 #define GSS_C_ANON_FLAG 0
53 #define GSS_C_PROT_READY_FLAG 0
54 #define GSS_C_TRANS_FLAG 0
55 #define GSS_C_DELEG_POLICY_FLAG 0
56
57#endif
58
59
60enum gsstokenformat_t {
61 GSSTOKENFORMAT_KRB=0,
62 GSSTOKENFORMAT_TLS
63};
64
65class gssprivate;
69
70class filedescriptor;
Definition avltree.h:11
Definition filedescriptor.h:13