Rudiments: /home/dmuse/temp/rudiments/include/rudiments/private/gssincludes.h Source File

Rudiments

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