/src/FreeRDP/winpr/libwinpr/sspi/Negotiate/negotiate.h
Line | Count | Source |
1 | | /** |
2 | | * WinPR: Windows Portable Runtime |
3 | | * Negotiate Security Package |
4 | | * |
5 | | * Copyright 2011-2012 Jiten Pathy |
6 | | * |
7 | | * Licensed under the Apache License, Version 2.0 (the "License"); |
8 | | * you may not use this file except in compliance with the License. |
9 | | * You may obtain a copy of the License at |
10 | | * |
11 | | * http://www.apache.org/licenses/LICENSE-2.0 |
12 | | * |
13 | | * Unless required by applicable law or agreed to in writing, software |
14 | | * distributed under the License is distributed on an "AS IS" BASIS, |
15 | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | | * See the License for the specific language governing permissions and |
17 | | * limitations under the License. |
18 | | */ |
19 | | |
20 | | #ifndef WINPR_SSPI_NEGOTIATE_PRIVATE_H |
21 | | #define WINPR_SSPI_NEGOTIATE_PRIVATE_H |
22 | | |
23 | | #include <winpr/sspi.h> |
24 | | |
25 | | #include "../sspi.h" |
26 | | |
27 | | #define NTLM_OID "1.3.6.1.4.1.311.2.2.10" |
28 | | |
29 | | typedef enum |
30 | | { |
31 | | NEGOTIATE_STATE_INITIAL, |
32 | | NEGOTIATE_STATE_FINAL_OPTIMISTIC, |
33 | | NEGOTIATE_STATE_NEGORESP, |
34 | | NEGOTIATE_STATE_MIC, |
35 | | NEGOTIATE_STATE_FINAL, |
36 | | } NEGOTIATE_STATE; |
37 | | |
38 | | typedef struct Mech_st Mech; |
39 | | |
40 | | typedef struct |
41 | | { |
42 | | NEGOTIATE_STATE state; |
43 | | CtxtHandle sub_context; |
44 | | SecBuffer mechTypes; |
45 | | const Mech* mech; |
46 | | BOOL mic; |
47 | | BOOL spnego; |
48 | | } NEGOTIATE_CONTEXT; |
49 | | |
50 | | static inline NEGOTIATE_CONTEXT NEGOTIATE_CONTEXT_init(void) |
51 | 0 | { |
52 | 0 | const NEGOTIATE_CONTEXT empty = { .state = NEGOTIATE_STATE_INITIAL, |
53 | 0 | .sub_context = { 0 }, |
54 | 0 | .mechTypes = { 0 }, |
55 | 0 | .mech = NULL, |
56 | 0 | .mic = FALSE, |
57 | | .spnego = FALSE }; |
58 | 0 | return empty; |
59 | 0 | } Unexecuted instantiation: sspi_winpr.c:NEGOTIATE_CONTEXT_init Unexecuted instantiation: negotiate.c:NEGOTIATE_CONTEXT_init |
60 | | |
61 | | extern const SecPkgInfoA NEGOTIATE_SecPkgInfoA; |
62 | | extern const SecPkgInfoW NEGOTIATE_SecPkgInfoW; |
63 | | extern const SecurityFunctionTableA NEGOTIATE_SecurityFunctionTableA; |
64 | | extern const SecurityFunctionTableW NEGOTIATE_SecurityFunctionTableW; |
65 | | |
66 | | BOOL NEGOTIATE_init(void); |
67 | | |
68 | | #endif /* WINPR_SSPI_NEGOTIATE_PRIVATE_H */ |