1 | /*
|
---|
2 | * Copyright (C) 2004 Juan Lang
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef __WINE_SSPI_H__
|
---|
29 | #define __WINE_SSPI_H__
|
---|
30 |
|
---|
31 | /* FIXME: #include <sdkddkver.h> */
|
---|
32 |
|
---|
33 | #ifdef __cplusplus
|
---|
34 | extern "C" {
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | #define SEC_ENTRY __stdcall
|
---|
38 |
|
---|
39 | typedef WCHAR SEC_WCHAR;
|
---|
40 | typedef CHAR SEC_CHAR;
|
---|
41 |
|
---|
42 | #ifndef __SECSTATUS_DEFINED__
|
---|
43 | #define __SECSTATUS_DEFINED__
|
---|
44 | typedef LONG SECURITY_STATUS;
|
---|
45 | #endif
|
---|
46 |
|
---|
47 | #ifdef UNICODE
|
---|
48 | typedef SEC_WCHAR * SECURITY_PSTR;
|
---|
49 | typedef CONST SEC_WCHAR * SECURITY_PCSTR;
|
---|
50 | #else
|
---|
51 | typedef SEC_CHAR * SECURITY_PSTR;
|
---|
52 | typedef CONST SEC_CHAR * SECURITY_PCSTR;
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | #ifndef __SECHANDLE_DEFINED__
|
---|
56 | #define __SECHANDLE_DEFINED__
|
---|
57 | typedef struct _SecHandle
|
---|
58 | {
|
---|
59 | ULONG_PTR dwLower;
|
---|
60 | ULONG_PTR dwUpper;
|
---|
61 | } SecHandle, *PSecHandle;
|
---|
62 | #endif
|
---|
63 |
|
---|
64 | #define SecInvalidateHandle(x) do { \
|
---|
65 | ((PSecHandle)(x))->dwLower = ((ULONG_PTR)((INT_PTR)-1)); \
|
---|
66 | ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR)-1)); \
|
---|
67 | } while (0)
|
---|
68 |
|
---|
69 | #define SecIsValidHandle(x) \
|
---|
70 | ((((PSecHandle)(x))->dwLower != ((ULONG_PTR)(INT_PTR)-1)) && \
|
---|
71 | (((PSecHandle)(x))->dwUpper != ((ULONG_PTR)(INT_PTR)-1)))
|
---|
72 |
|
---|
73 | typedef SecHandle CredHandle;
|
---|
74 | typedef PSecHandle PCredHandle;
|
---|
75 |
|
---|
76 | #ifndef __WINE_CTXTHANDLE_DEFINED__
|
---|
77 | #define __WINE_CTXTHANDLE_DEFINED__
|
---|
78 | typedef SecHandle CtxtHandle;
|
---|
79 | typedef PSecHandle PCtxtHandle;
|
---|
80 | #endif
|
---|
81 |
|
---|
82 | typedef struct _SECURITY_INTEGER
|
---|
83 | {
|
---|
84 | ULONG LowPart;
|
---|
85 | LONG HighPart;
|
---|
86 | } SECURITY_INTEGER, *PSECURITY_INTEGER;
|
---|
87 | typedef SECURITY_INTEGER TimeStamp, *PTimeStamp;
|
---|
88 |
|
---|
89 | #ifndef __UNICODE_STRING_DEFINED__
|
---|
90 | #define __UNICODE_STRING_DEFINED__
|
---|
91 | typedef struct _UNICODE_STRING {
|
---|
92 | USHORT Length; /* bytes */
|
---|
93 | USHORT MaximumLength; /* bytes */
|
---|
94 | PWSTR Buffer;
|
---|
95 | } UNICODE_STRING, *PUNICODE_STRING;
|
---|
96 | #endif
|
---|
97 |
|
---|
98 | typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;
|
---|
99 |
|
---|
100 | typedef struct _SecPkgInfoA
|
---|
101 | {
|
---|
102 | ULONG fCapabilities;
|
---|
103 | USHORT wVersion;
|
---|
104 | USHORT wRPCID;
|
---|
105 | ULONG cbMaxToken;
|
---|
106 | SEC_CHAR *Name;
|
---|
107 | SEC_CHAR *Comment;
|
---|
108 | } SecPkgInfoA, *PSecPkgInfoA;
|
---|
109 |
|
---|
110 | typedef struct _SecPkgInfoW
|
---|
111 | {
|
---|
112 | ULONG fCapabilities;
|
---|
113 | USHORT wVersion;
|
---|
114 | USHORT wRPCID;
|
---|
115 | ULONG cbMaxToken;
|
---|
116 | SEC_WCHAR *Name;
|
---|
117 | SEC_WCHAR *Comment;
|
---|
118 | } SecPkgInfoW, *PSecPkgInfoW;
|
---|
119 |
|
---|
120 | #define SecPkgInfo WINELIB_NAME_AW(SecPkgInfo)
|
---|
121 | #define PSecPkgInfo WINELIB_NAME_AW(PSecPkgInfo)
|
---|
122 |
|
---|
123 | /* fCapabilities field of SecPkgInfo */
|
---|
124 | #define SECPKG_FLAG_INTEGRITY 0x00000001
|
---|
125 | #define SECPKG_FLAG_PRIVACY 0x00000002
|
---|
126 | #define SECPKG_FLAG_TOKEN_ONLY 0x00000004
|
---|
127 | #define SECPKG_FLAG_DATAGRAM 0x00000008
|
---|
128 | #define SECPKG_FLAG_CONNECTION 0x00000010
|
---|
129 | #define SECPKG_FLAG_MULTI_REQUIRED 0x00000020
|
---|
130 | #define SECPKG_FLAG_CLIENT_ONLY 0x00000040
|
---|
131 | #define SECPKG_FLAG_EXTENDED_ERROR 0x00000080
|
---|
132 | #define SECPKG_FLAG_IMPERSONATION 0x00000100
|
---|
133 | #define SECPKG_FLAG_ACCEPT_WIN32_NAME 0x00000200
|
---|
134 | #define SECPKG_FLAG_STREAM 0x00000400
|
---|
135 | #define SECPKG_FLAG_NEGOTIABLE 0x00000800
|
---|
136 | #define SECPKG_FLAG_GSS_COMPATIBLE 0x00001000
|
---|
137 | #define SECPKG_FLAG_LOGON 0x00002000
|
---|
138 | #define SECPKG_FLAG_ASCII_BUFFERS 0x00004000
|
---|
139 | #define SECPKG_FLAG_FRAGMENT 0x00008000
|
---|
140 | #define SECPKG_FLAG_MUTUAL_AUTH 0x00010000
|
---|
141 | #define SECPKG_FLAG_DELEGATION 0x00020000
|
---|
142 | #define SECPKG_FLAG_READONLY_WITH_CHECKSUM 0x00040000
|
---|
143 |
|
---|
144 | typedef struct _SecBuffer
|
---|
145 | {
|
---|
146 | ULONG cbBuffer;
|
---|
147 | ULONG BufferType;
|
---|
148 | PVOID pvBuffer;
|
---|
149 | } SecBuffer, *PSecBuffer;
|
---|
150 |
|
---|
151 | /* values for BufferType */
|
---|
152 | #define SECBUFFER_EMPTY 0
|
---|
153 | #define SECBUFFER_DATA 1
|
---|
154 | #define SECBUFFER_TOKEN 2
|
---|
155 | #define SECBUFFER_PKG_PARAMS 3
|
---|
156 | #define SECBUFFER_MISSING 4
|
---|
157 | #define SECBUFFER_EXTRA 5
|
---|
158 | #define SECBUFFER_STREAM_TRAILER 6
|
---|
159 | #define SECBUFFER_STREAM_HEADER 7
|
---|
160 | #define SECBUFFER_NEGOTIATION_INFO 8
|
---|
161 | #define SECBUFFER_PADDING 9
|
---|
162 | #define SECBUFFER_STREAM 10
|
---|
163 | #define SECBUFFER_MECHLIST 11
|
---|
164 | #define SECBUFFER_MECHLIST_SIGNATURE 12
|
---|
165 | #define SECBUFFER_TARGET 13
|
---|
166 | #define SECBUFFER_CHANNEL_BINDINGS 14
|
---|
167 |
|
---|
168 | #define SECBUFFER_ATTRMASK 0xf0000000
|
---|
169 | #define SECBUFFER_READONLY 0x80000000
|
---|
170 | #define SECBUFFER_READONLY_WITH_CHECKSUM 0x10000000
|
---|
171 | #define SECBUFFER_RESERVED 0x60000000
|
---|
172 |
|
---|
173 | typedef struct _SecBufferDesc
|
---|
174 | {
|
---|
175 | ULONG ulVersion;
|
---|
176 | ULONG cBuffers;
|
---|
177 | PSecBuffer pBuffers;
|
---|
178 | } SecBufferDesc, *PSecBufferDesc;
|
---|
179 |
|
---|
180 | /* values for ulVersion */
|
---|
181 | #define SECBUFFER_VERSION 0
|
---|
182 |
|
---|
183 | typedef void (SEC_ENTRY *SEC_GET_KEY_FN)(void *Arg, void *Principal,
|
---|
184 | ULONG KeyVer, void **Key, SECURITY_STATUS *Status);
|
---|
185 |
|
---|
186 | SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesA(PULONG pcPackages,
|
---|
187 | PSecPkgInfoA *ppPackageInfo);
|
---|
188 | SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesW(PULONG pcPackages,
|
---|
189 | PSecPkgInfoW *ppPackageInfo);
|
---|
190 | #define EnumerateSecurityPackages WINELIB_NAME_AW(EnumerateSecurityPackages)
|
---|
191 |
|
---|
192 | typedef SECURITY_STATUS (SEC_ENTRY *ENUMERATE_SECURITY_PACKAGES_FN_A)(PULONG,
|
---|
193 | PSecPkgInfoA *);
|
---|
194 | typedef SECURITY_STATUS (SEC_ENTRY *ENUMERATE_SECURITY_PACKAGES_FN_W)(PULONG,
|
---|
195 | PSecPkgInfoW *);
|
---|
196 | #define ENUMERATE_SECURITY_PACKAGES_FN WINELIB_NAME_AW(ENUMERATE_SECURITY_PACKAGES_FN_)
|
---|
197 |
|
---|
198 | SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesA(
|
---|
199 | PCredHandle phCredential, ULONG ulAttribute, void *pBuffer);
|
---|
200 | SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesW(
|
---|
201 | PCredHandle phCredential, ULONG ulAttribute, void *pBuffer);
|
---|
202 | #define QueryCredentialsAttributes WINELIB_NAME_AW(QueryCredentialsAttributes)
|
---|
203 |
|
---|
204 | typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CREDENTIALS_ATTRIBUTES_FN_A)
|
---|
205 | (PCredHandle, ULONG, PVOID);
|
---|
206 | typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CREDENTIALS_ATTRIBUTES_FN_W)
|
---|
207 | (PCredHandle, ULONG, PVOID);
|
---|
208 | #define QUERY_CREDENTIALS_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CREDENTIALS_ATTRIBUTES_FN_)
|
---|
209 |
|
---|
210 | /* values for QueryCredentialsAttributes ulAttribute */
|
---|
211 | #define SECPKG_CRED_ATTR_NAMES 1
|
---|
212 |
|
---|
213 | /* types for QueryCredentialsAttributes */
|
---|
214 | typedef struct _SecPkgCredentials_NamesA
|
---|
215 | {
|
---|
216 | SEC_CHAR *sUserName;
|
---|
217 | } SecPkgCredentials_NamesA, *PSecPkgCredentials_NamesA;
|
---|
218 |
|
---|
219 | typedef struct _SecPkgCredentials_NamesW
|
---|
220 | {
|
---|
221 | SEC_WCHAR *sUserName;
|
---|
222 | } SecPkgCredentials_NamesW, *PSecPkgCredentials_NamesW;
|
---|
223 |
|
---|
224 | #define SecPkgCredentials_Names WINELIB_NAME_AW(SecPkgCredentials_Names)
|
---|
225 |
|
---|
226 | SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleA(
|
---|
227 | SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse,
|
---|
228 | PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
|
---|
229 | PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry);
|
---|
230 | SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleW(
|
---|
231 | SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse,
|
---|
232 | PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
|
---|
233 | PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry);
|
---|
234 | #define AcquireCredentialsHandle WINELIB_NAME_AW(AcquireCredentialsHandle)
|
---|
235 |
|
---|
236 | /* flags for fCredentialsUse */
|
---|
237 | #define SECPKG_CRED_INBOUND 0x00000001
|
---|
238 | #define SECPKG_CRED_OUTBOUND 0x00000002
|
---|
239 | #define SECPKG_CRED_BOTH (SECPKG_CRED_INBOUND | SECPKG_CRED_OUTBOUND)
|
---|
240 | #define SECPKG_CRED_DEFAULT 0x00000004
|
---|
241 | #define SECPKG_CRED_RESERVED 0xf0000000
|
---|
242 |
|
---|
243 | typedef SECURITY_STATUS (SEC_ENTRY *ACQUIRE_CREDENTIALS_HANDLE_FN_A)(
|
---|
244 | SEC_CHAR *, SEC_CHAR *, ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID,
|
---|
245 | PCredHandle, PTimeStamp);
|
---|
246 | typedef SECURITY_STATUS (SEC_ENTRY *ACQUIRE_CREDENTIALS_HANDLE_FN_W)(
|
---|
247 | SEC_WCHAR *, SEC_WCHAR *, ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID,
|
---|
248 | PCredHandle, PTimeStamp);
|
---|
249 | #define ACQUIRE_CREDENTIALS_HANDLE_FN WINELIB_NAME_AW(ACQUIRE_CREDENTIALS_HANDLE_FN_)
|
---|
250 |
|
---|
251 | SECURITY_STATUS SEC_ENTRY FreeContextBuffer(PVOID pv);
|
---|
252 |
|
---|
253 | typedef SECURITY_STATUS (SEC_ENTRY *FREE_CONTEXT_BUFFER_FN)(PVOID);
|
---|
254 |
|
---|
255 | SECURITY_STATUS SEC_ENTRY FreeCredentialsHandle(PCredHandle
|
---|
256 | phCredential);
|
---|
257 |
|
---|
258 | #define FreeCredentialHandle FreeCredentialsHandle
|
---|
259 |
|
---|
260 | typedef SECURITY_STATUS (SEC_ENTRY *FREE_CREDENTIALS_HANDLE_FN)(PCredHandle);
|
---|
261 |
|
---|
262 | SECURITY_STATUS SEC_ENTRY InitializeSecurityContextA(
|
---|
263 | PCredHandle phCredential, PCtxtHandle phContext,
|
---|
264 | SEC_CHAR *pszTargetName, ULONG fContextReq,
|
---|
265 | ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
|
---|
266 | ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
|
---|
267 | ULONG *pfContextAttr, PTimeStamp ptsExpiry);
|
---|
268 | SECURITY_STATUS SEC_ENTRY InitializeSecurityContextW(
|
---|
269 | PCredHandle phCredential, PCtxtHandle phContext,
|
---|
270 | SEC_WCHAR *pszTargetName, ULONG fContextReq,
|
---|
271 | ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
|
---|
272 | ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
|
---|
273 | ULONG *pfContextAttr, PTimeStamp ptsExpiry);
|
---|
274 | #define InitializeSecurityContext WINELIB_NAME_AW(InitializeSecurityContext)
|
---|
275 |
|
---|
276 | typedef SECURITY_STATUS (SEC_ENTRY *INITIALIZE_SECURITY_CONTEXT_FN_A)
|
---|
277 | (PCredHandle, PCtxtHandle, SEC_CHAR *, ULONG, ULONG, ULONG, PSecBufferDesc,
|
---|
278 | ULONG, PCtxtHandle, PSecBufferDesc, ULONG *, PTimeStamp);
|
---|
279 | typedef SECURITY_STATUS (SEC_ENTRY *INITIALIZE_SECURITY_CONTEXT_FN_W)
|
---|
280 | (PCredHandle, PCtxtHandle, SEC_WCHAR *, ULONG, ULONG, ULONG, PSecBufferDesc,
|
---|
281 | ULONG, PCtxtHandle, PSecBufferDesc, ULONG *, PTimeStamp);
|
---|
282 | #define INITIALIZE_SECURITY_CONTEXT_FN WINELIB_NAME_AW(INITIALIZE_SECURITY_CONTEXT_FN_)
|
---|
283 |
|
---|
284 | /* flags for InitializeSecurityContext fContextReq and pfContextAttr */
|
---|
285 | #define ISC_REQ_DELEGATE 0x00000001
|
---|
286 | #define ISC_REQ_MUTUAL_AUTH 0x00000002
|
---|
287 | #define ISC_REQ_REPLAY_DETECT 0x00000004
|
---|
288 | #define ISC_REQ_SEQUENCE_DETECT 0x00000008
|
---|
289 | #define ISC_REQ_CONFIDENTIALITY 0x00000010
|
---|
290 | #define ISC_REQ_USE_SESSION_KEY 0x00000020
|
---|
291 | #define ISC_REQ_PROMPT_FOR_CREDS 0x00000040
|
---|
292 | #define ISC_REQ_USE_SUPPLIED_CREDS 0x00000080
|
---|
293 | #define ISC_REQ_ALLOCATE_MEMORY 0x00000100
|
---|
294 | #define ISC_REQ_USE_DCE_STYLE 0x00000200
|
---|
295 | #define ISC_REQ_DATAGRAM 0x00000400
|
---|
296 | #define ISC_REQ_CONNECTION 0x00000800
|
---|
297 | #define ISC_REQ_CALL_LEVEL 0x00001000
|
---|
298 | #define ISC_REQ_FRAGMENT_SUPPLIED 0x00002000
|
---|
299 | #define ISC_REQ_EXTENDED_ERROR 0x00004000
|
---|
300 | #define ISC_REQ_STREAM 0x00008000
|
---|
301 | #define ISC_REQ_INTEGRITY 0x00010000
|
---|
302 | #define ISC_REQ_IDENTIFY 0x00020000
|
---|
303 | #define ISC_REQ_NULL_SESSION 0x00040000
|
---|
304 | #define ISC_REQ_MANUAL_CRED_VALIDATION 0x00080000
|
---|
305 | #define ISC_REQ_RESERVED1 0x00100000
|
---|
306 | #define ISC_REQ_FRAGMENT_TO_FIT 0x00200000
|
---|
307 |
|
---|
308 | #define ISC_RET_DELEGATE 0x00000001
|
---|
309 | #define ISC_RET_MUTUAL_AUTH 0x00000002
|
---|
310 | #define ISC_RET_REPLAY_DETECT 0x00000004
|
---|
311 | #define ISC_RET_SEQUENCE_DETECT 0x00000008
|
---|
312 | #define ISC_RET_CONFIDENTIALITY 0x00000010
|
---|
313 | #define ISC_RET_USE_SESSION_KEY 0x00000020
|
---|
314 | #define ISC_RET_USED_COLLECTED_CREDS 0x00000040
|
---|
315 | #define ISC_RET_USED_SUPPLIED_CREDS 0x00000080
|
---|
316 | #define ISC_RET_ALLOCATED_MEMORY 0x00000100
|
---|
317 | #define ISC_RET_USED_DCE_STYLE 0x00000200
|
---|
318 | #define ISC_RET_DATAGRAM 0x00000400
|
---|
319 | #define ISC_RET_CONNECTION 0x00000800
|
---|
320 | #define ISC_RET_INTERMEDIATE_RETURN 0x00001000
|
---|
321 | #define ISC_RET_CALL_LEVEL 0x00002000
|
---|
322 | #define ISC_RET_EXTENDED_ERROR 0x00004000
|
---|
323 | #define ISC_RET_STREAM 0x00008000
|
---|
324 | #define ISC_RET_INTEGRITY 0x00010000
|
---|
325 | #define ISC_RET_IDENTIFY 0x00020000
|
---|
326 | #define ISC_RET_NULL_SESSION 0x00040000
|
---|
327 | #define ISC_RET_MANUAL_CRED_VALIDATION 0x00080000
|
---|
328 | #define ISC_RET_RESERVED1 0x00100000
|
---|
329 | #define ISC_RET_FRAGMENT_ONLY 0x00200000
|
---|
330 |
|
---|
331 | SECURITY_STATUS SEC_ENTRY AcceptSecurityContext(
|
---|
332 | PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput,
|
---|
333 | ULONG fContextReq, ULONG TargetDataRep,
|
---|
334 | PCtxtHandle phNewContext, PSecBufferDesc pOutput,
|
---|
335 | ULONG *pfContextAttr, PTimeStamp ptsExpiry);
|
---|
336 |
|
---|
337 | typedef SECURITY_STATUS (SEC_ENTRY *ACCEPT_SECURITY_CONTEXT_FN)(PCredHandle,
|
---|
338 | PCtxtHandle, PSecBufferDesc, ULONG, ULONG, PCtxtHandle,
|
---|
339 | PSecBufferDesc, ULONG *, PTimeStamp);
|
---|
340 |
|
---|
341 | /* flags for AcceptSecurityContext fContextReq and pfContextAttr */
|
---|
342 | #define ASC_REQ_DELEGATE 0x00000001
|
---|
343 | #define ASC_REQ_MUTUAL_AUTH 0x00000002
|
---|
344 | #define ASC_REQ_REPLAY_DETECT 0x00000004
|
---|
345 | #define ASC_REQ_SEQUENCE_DETECT 0x00000008
|
---|
346 | #define ASC_REQ_CONFIDENTIALITY 0x00000010
|
---|
347 | #define ASC_REQ_USE_SESSION_KEY 0x00000020
|
---|
348 | #define ASC_REQ_ALLOCATE_MEMORY 0x00000100
|
---|
349 | #define ASC_REQ_USE_DCE_STYLE 0x00000200
|
---|
350 | #define ASC_REQ_DATAGRAM 0x00000400
|
---|
351 | #define ASC_REQ_CONNECTION 0x00000800
|
---|
352 | #define ASC_REQ_CALL_LEVEL 0x00001000
|
---|
353 | #define ASC_REQ_FRAGMENT_SUPPLIED 0x00002000
|
---|
354 | #define ASC_REQ_EXTENDED_ERROR 0x00008000
|
---|
355 | #define ASC_REQ_STREAM 0x00010000
|
---|
356 | #define ASC_REQ_INTEGRITY 0x00020000
|
---|
357 | #define ASC_REQ_LICENSING 0x00040000
|
---|
358 | #define ASC_REQ_IDENTIFY 0x00080000
|
---|
359 | #define ASC_REQ_ALLOW_NULL_SESSION 0x00100000
|
---|
360 | #define ASC_REQ_ALLOW_NON_USER_LOGONS 0x00200000
|
---|
361 | #define ASC_REQ_ALLOW_CONTEXT_REPLAY 0x00400000
|
---|
362 | #define ASC_REQ_FRAGMENT_TO_FIT 0x00800000
|
---|
363 | #define ASC_REQ_FRAGMENT_NO_TOKEN 0x01000000
|
---|
364 |
|
---|
365 | #define ASC_RET_DELEGATE 0x00000001
|
---|
366 | #define ASC_RET_MUTUAL_AUTH 0x00000002
|
---|
367 | #define ASC_RET_REPLAY_DETECT 0x00000004
|
---|
368 | #define ASC_RET_SEQUENCE_DETECT 0x00000008
|
---|
369 | #define ASC_RET_CONFIDENTIALITY 0x00000010
|
---|
370 | #define ASC_RET_USE_SESSION_KEY 0x00000020
|
---|
371 | #define ASC_RET_ALLOCATED_MEMORY 0x00000100
|
---|
372 | #define ASC_RET_USED_DCE_STYLE 0x00000200
|
---|
373 | #define ASC_RET_DATAGRAM 0x00000400
|
---|
374 | #define ASC_RET_CONNECTION 0x00000800
|
---|
375 | #define ASC_RET_CALL_LEVEL 0x00002000
|
---|
376 | #define ASC_RET_THIRD_LEG_FAILED 0x00004000
|
---|
377 | #define ASC_RET_EXTENDED_ERROR 0x00008000
|
---|
378 | #define ASC_RET_STREAM 0x00010000
|
---|
379 | #define ASC_RET_INTEGRITY 0x00020000
|
---|
380 | #define ASC_RET_LICENSING 0x00040000
|
---|
381 | #define ASC_RET_IDENTIFY 0x00080000
|
---|
382 | #define ASC_RET_NULL_SESSION 0x00100000
|
---|
383 | #define ASC_RET_ALLOW_NON_USER_LOGONS 0x00200000
|
---|
384 | #define ASC_RET_ALLOW_CONTEXT_REPLAY 0x00400000
|
---|
385 | #define ASC_RET_FRAGMENT_ONLY 0x00800000
|
---|
386 | #define ASC_RET_NO_TOKEN 0x01000000
|
---|
387 |
|
---|
388 | /* values for TargetDataRep */
|
---|
389 | #define SECURITY_NATIVE_DREP 0x00000010
|
---|
390 | #define SECURITY_NETWORK_DREP 0x00000000
|
---|
391 |
|
---|
392 | SECURITY_STATUS SEC_ENTRY CompleteAuthToken(PCtxtHandle phContext,
|
---|
393 | PSecBufferDesc pToken);
|
---|
394 |
|
---|
395 | typedef SECURITY_STATUS (SEC_ENTRY *COMPLETE_AUTH_TOKEN_FN)(PCtxtHandle,
|
---|
396 | PSecBufferDesc);
|
---|
397 |
|
---|
398 | SECURITY_STATUS SEC_ENTRY DeleteSecurityContext(PCtxtHandle phContext);
|
---|
399 |
|
---|
400 | typedef SECURITY_STATUS (SEC_ENTRY *DELETE_SECURITY_CONTEXT_FN)(PCtxtHandle);
|
---|
401 |
|
---|
402 | SECURITY_STATUS SEC_ENTRY ApplyControlToken(PCtxtHandle phContext,
|
---|
403 | PSecBufferDesc pInput);
|
---|
404 |
|
---|
405 | typedef SECURITY_STATUS (SEC_ENTRY *APPLY_CONTROL_TOKEN_FN)(PCtxtHandle,
|
---|
406 | PSecBufferDesc);
|
---|
407 |
|
---|
408 | SECURITY_STATUS SEC_ENTRY QueryContextAttributesA(PCtxtHandle phContext,
|
---|
409 | ULONG ulAttribute, void *pBuffer);
|
---|
410 | SECURITY_STATUS SEC_ENTRY QueryContextAttributesW(PCtxtHandle phContext,
|
---|
411 | ULONG ulAttribute, void *pBuffer);
|
---|
412 | #define QueryContextAttributes WINELIB_NAME_AW(QueryContextAttributes)
|
---|
413 |
|
---|
414 | typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,
|
---|
415 | ULONG, void *);
|
---|
416 | typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
|
---|
417 | ULONG, void *);
|
---|
418 | #define QUERY_CONTEXT_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CONTEXT_ATTRIBUTES_FN_)
|
---|
419 |
|
---|
420 | /* values for QueryContextAttributes/SetContextAttributes ulAttribute */
|
---|
421 | #define SECPKG_ATTR_SIZES 0
|
---|
422 | #define SECPKG_ATTR_NAMES 1
|
---|
423 | #define SECPKG_ATTR_LIFESPAN 2
|
---|
424 | #define SECPKG_ATTR_DCE_INFO 3
|
---|
425 | #define SECPKG_ATTR_STREAM_SIZES 4
|
---|
426 | #define SECPKG_ATTR_KEY_INFO 5
|
---|
427 | #define SECPKG_ATTR_AUTHORITY 6
|
---|
428 | #define SECPKG_ATTR_PROTO_INFO 7
|
---|
429 | #define SECPKG_ATTR_PASSWORD_EXPIRY 8
|
---|
430 | #define SECPKG_ATTR_SESSION_KEY 9
|
---|
431 | #define SECPKG_ATTR_PACKAGE_INFO 10
|
---|
432 | #define SECPKG_ATTR_USER_FLAGS 11
|
---|
433 | #define SECPKG_ATTR_NEGOTIATION_INFO 12
|
---|
434 | #define SECPKG_ATTR_NATIVE_NAMES 13
|
---|
435 | #define SECPKG_ATTR_FLAGS 14
|
---|
436 | #define SECPKG_ATTR_USE_VALIDATED 15
|
---|
437 | #define SECPKG_ATTR_CREDENTIAL_NAME 16
|
---|
438 | #define SECPKG_ATTR_TARGET_INFORMATION 17
|
---|
439 | #define SECPKG_ATTR_ACCESS_TOKEN 18
|
---|
440 | #define SECPKG_ATTR_TARGET 19
|
---|
441 | #define SECPKG_ATTR_AUTHENTICATION_ID 20
|
---|
442 |
|
---|
443 | /* types for QueryContextAttributes/SetContextAttributes */
|
---|
444 |
|
---|
445 | typedef struct _SecPkgContext_Sizes
|
---|
446 | {
|
---|
447 | ULONG cbMaxToken;
|
---|
448 | ULONG cbMaxSignature;
|
---|
449 | ULONG cbBlockSize;
|
---|
450 | ULONG cbSecurityTrailer;
|
---|
451 | } SecPkgContext_Sizes, *PSecPkgContext_Sizes;
|
---|
452 |
|
---|
453 | typedef struct _SecPkgContext_StreamSizes
|
---|
454 | {
|
---|
455 | ULONG cbHeader;
|
---|
456 | ULONG cbTrailer;
|
---|
457 | ULONG cbMaximumMessage;
|
---|
458 | ULONG cbBuffers;
|
---|
459 | ULONG cbBlockSize;
|
---|
460 | } SecPkgContext_StreamSizes, *PSecPkgContext_StreamSizes;
|
---|
461 |
|
---|
462 | typedef struct _SecPkgContext_NamesA
|
---|
463 | {
|
---|
464 | SEC_CHAR *sUserName;
|
---|
465 | } SecPkgContext_NamesA, *PSecPkgContext_NamesA;
|
---|
466 |
|
---|
467 | typedef struct _SecPkgContext_NamesW
|
---|
468 | {
|
---|
469 | SEC_WCHAR *sUserName;
|
---|
470 | } SecPkgContext_NamesW, *PSecPkgContext_NamesW;
|
---|
471 |
|
---|
472 | #define SecPkgContext_Names WINELIB_NAME_AW(SecPkgContext_Names)
|
---|
473 | #define PSecPkgContext_Names WINELIB_NAME_AW(PSecPkgContext_Names)
|
---|
474 |
|
---|
475 | typedef struct _SecPkgContext_Lifespan
|
---|
476 | {
|
---|
477 | TimeStamp tsStart;
|
---|
478 | TimeStamp tsExpiry;
|
---|
479 | } SecPkgContext_Lifespan, *PSecPkgContext_Lifespan;
|
---|
480 |
|
---|
481 | typedef struct _SecPkgContext_DceInfo
|
---|
482 | {
|
---|
483 | ULONG AuthzSvc;
|
---|
484 | PVOID pPac;
|
---|
485 | } SecPkgContext_DceInfo, *PSecPkgContext_DceInfo;
|
---|
486 |
|
---|
487 | typedef struct _SecPkgContext_KeyInfoA
|
---|
488 | {
|
---|
489 | SEC_CHAR *sSignatureAlgorithmName;
|
---|
490 | SEC_CHAR *sEncryptAlgorithmName;
|
---|
491 | ULONG KeySize;
|
---|
492 | ULONG SignatureAlgorithm;
|
---|
493 | ULONG EncryptAlgorithm;
|
---|
494 | } SecPkgContext_KeyInfoA, *PSecPkgContext_KeyInfoA;
|
---|
495 |
|
---|
496 | typedef struct _SecPkgContext_KeyInfoW
|
---|
497 | {
|
---|
498 | SEC_WCHAR *sSignatureAlgorithmName;
|
---|
499 | SEC_WCHAR *sEncryptAlgorithmName;
|
---|
500 | ULONG KeySize;
|
---|
501 | ULONG SignatureAlgorithm;
|
---|
502 | ULONG EncryptAlgorithm;
|
---|
503 | } SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW;
|
---|
504 |
|
---|
505 | #define SecPkgContext_KeyInfo WINELIB_NAME_AW(SecPkgContext_KeyInfo)
|
---|
506 | #define PSecPkgContext_KeyInfo WINELIB_NAME_AW(PSecPkgContext_KeyInfo)
|
---|
507 |
|
---|
508 | typedef struct _SecPkgContext_AuthorityA
|
---|
509 | {
|
---|
510 | SEC_CHAR *sAuthorityName;
|
---|
511 | } SecPkgContext_AuthorityA, *PSecPkgContext_AuthorityA;
|
---|
512 |
|
---|
513 | typedef struct _SecPkgContext_AuthorityW
|
---|
514 | {
|
---|
515 | SEC_WCHAR *sAuthorityName;
|
---|
516 | } SecPkgContext_AuthorityW, *PSecPkgContext_AuthorityW;
|
---|
517 |
|
---|
518 | #define SecPkgContext_Authority WINELIB_NAME_AW(SecPkgContext_Authority)
|
---|
519 | #define PSecPkgContext_Authority WINELIB_NAME_AW(PSecPkgContext_Authority)
|
---|
520 |
|
---|
521 | typedef struct _SecPkgContext_ProtoInfoA
|
---|
522 | {
|
---|
523 | SEC_CHAR *sProtocolName;
|
---|
524 | ULONG majorVersion;
|
---|
525 | ULONG minorVersion;
|
---|
526 | } SecPkgContext_ProtoInfoA, *PSecPkgContext_ProtoInfoA;
|
---|
527 |
|
---|
528 | typedef struct _SecPkgContext_ProtoInfoW
|
---|
529 | {
|
---|
530 | SEC_WCHAR *sProtocolName;
|
---|
531 | ULONG majorVersion;
|
---|
532 | ULONG minorVersion;
|
---|
533 | } SecPkgContext_ProtoInfoW, *PSecPkgContext_ProtoInfoW;
|
---|
534 |
|
---|
535 | #define SecPkgContext_ProtoInfo WINELIB_NAME_AW(SecPkgContext_ProtoInfo)
|
---|
536 | #define PSecPkgContext_ProtoInfo WINELIB_NAME_AW(PSecPkgContext_ProtoInfo)
|
---|
537 |
|
---|
538 | typedef struct _SecPkgContext_PasswordExpiry
|
---|
539 | {
|
---|
540 | TimeStamp tsPasswordExpires;
|
---|
541 | } SecPkgContext_PasswordExpiry, *PSecPkgContext_PasswordExpiry;
|
---|
542 |
|
---|
543 | typedef struct _SecPkgContext_SessionKey
|
---|
544 | {
|
---|
545 | ULONG SessionKeyLength;
|
---|
546 | unsigned char *SessionKey;
|
---|
547 | } SecPkgContext_SessionKey, *PSecPkgContext_SessionKey;
|
---|
548 |
|
---|
549 | typedef struct _SecPkgContext_PackageInfoA
|
---|
550 | {
|
---|
551 | PSecPkgInfoA PackageInfo;
|
---|
552 | } SecPkgContext_PackageInfoA, *PSecPkgContext_PackageInfoA;
|
---|
553 |
|
---|
554 | typedef struct _SecPkgContext_PackageInfoW
|
---|
555 | {
|
---|
556 | PSecPkgInfoW PackageInfo;
|
---|
557 | } SecPkgContext_PackageInfoW, *PSecPkgContext_PackageInfoW;
|
---|
558 |
|
---|
559 | #define SecPkgContext_PackageInfo WINELIB_NAME_AW(SecPkgContext_PackageInfo)
|
---|
560 | #define PSecPkgContext_PackageInfo WINELIB_NAME_AW(PSecPkgContext_PackageInfo)
|
---|
561 |
|
---|
562 | typedef struct _SecPkgContext_Flags
|
---|
563 | {
|
---|
564 | ULONG Flags;
|
---|
565 | } SecPkgContext_Flags, *PSecPkgContext_Flags;
|
---|
566 |
|
---|
567 | typedef struct _SecPkgContext_UserFlags
|
---|
568 | {
|
---|
569 | ULONG UserFlags;
|
---|
570 | } SecPkgContext_UserFlags, *PSecPkgContext_UserFlags;
|
---|
571 |
|
---|
572 | typedef struct _SecPkgContext_NegotiationInfoA
|
---|
573 | {
|
---|
574 | PSecPkgInfoA PackageInfo;
|
---|
575 | ULONG NegotiationState;
|
---|
576 | } SecPkgContext_NegotiationInfoA, *PSecPkgContext_NegotiationInfoA;
|
---|
577 |
|
---|
578 | typedef struct _SecPkgContext_NegotiationInfoW
|
---|
579 | {
|
---|
580 | PSecPkgInfoW PackageInfo;
|
---|
581 | ULONG NegotiationState;
|
---|
582 | } SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW;
|
---|
583 |
|
---|
584 | #define SecPkgContext_NegotiationInfo WINELIB_NAME_AW(SecPkgContext_NegotiationInfo)
|
---|
585 | #define PSecPkgContext_NegotiationInfo WINELIB_NAME_AW(PSecPkgContext_NegotiationInfo)
|
---|
586 |
|
---|
587 | /* values for NegotiationState */
|
---|
588 | #define SECPKG_NEGOTIATION_COMPLETE 0
|
---|
589 | #define SECPKG_NEGOTIATION_OPTIMISTIC 1
|
---|
590 | #define SECPKG_NEGOTIATION_IN_PROGRESS 2
|
---|
591 | #define SECPKG_NEGOTIATION_DIRECT 3
|
---|
592 | #define SECPKG_NEGOTIATION_TRY_MULTICRED 4
|
---|
593 |
|
---|
594 | typedef struct _SecPkgContext_NativeNamesA
|
---|
595 | {
|
---|
596 | SEC_CHAR *sClientName;
|
---|
597 | SEC_CHAR *sServerName;
|
---|
598 | } SecPkgContext_NativeNamesA, *PSecPkgContext_NativeNamesA;
|
---|
599 |
|
---|
600 | typedef struct _SecPkgContext_NativeNamesW
|
---|
601 | {
|
---|
602 | SEC_WCHAR *sClientName;
|
---|
603 | SEC_WCHAR *sServerName;
|
---|
604 | } SecPkgContext_NativeNamesW, *PSecPkgContext_NativeNamesW;
|
---|
605 |
|
---|
606 | #define SecPkgContext_NativeNames WINELIB_NAME_AW(SecPkgContext_NativeNames)
|
---|
607 | #define PSecPkgContext_NativeNames WINELIB_NAME_AW(PSecPkgContext_NativeNames)
|
---|
608 |
|
---|
609 | typedef struct _SecPkgContext_CredentialNameA
|
---|
610 | {
|
---|
611 | ULONG CredentialType;
|
---|
612 | SEC_CHAR *sCredentialName;
|
---|
613 | } SecPkgContext_CredentialNameA, *PSecPkgContext_CredentialNameA;
|
---|
614 |
|
---|
615 | typedef struct _SecPkgContext_CredentialNameW
|
---|
616 | {
|
---|
617 | ULONG CredentialType;
|
---|
618 | SEC_WCHAR *sCredentialName;
|
---|
619 | } SecPkgContext_CredentialNameW, *PSecPkgContext_CredentialNameW;
|
---|
620 |
|
---|
621 | #define SecPkgContext_CredentialName WINELIB_NAME_AW(SecPkgContext_CredentialName)
|
---|
622 | #define PSecPkgContext_CredentialName WINELIB_NAME_AW(PSecPkgContext_CredentialName)
|
---|
623 |
|
---|
624 | typedef struct _SecPkgContext_AccessToken
|
---|
625 | {
|
---|
626 | void *AccessToken;
|
---|
627 | } SecPkgContext_AccessToken, *PSecPkgContext_AccessToken;
|
---|
628 |
|
---|
629 | typedef struct _SecPkgContext_TargetInformation
|
---|
630 | {
|
---|
631 | ULONG MarshalledTargetInfoLength;
|
---|
632 | unsigned char *MarshalledTargetInfo;
|
---|
633 | } SecPkgContext_TargetInformation, *PSecPkgContext_TargetInformation;
|
---|
634 |
|
---|
635 | typedef struct _SecPkgContext_AuthzID
|
---|
636 | {
|
---|
637 | ULONG AuthzIDLength;
|
---|
638 | char *AuthzID;
|
---|
639 | } SecPkgContext_AuthzID, *PSecPkgContext_AuthzID;
|
---|
640 |
|
---|
641 | typedef struct _SecPkgContext_Target
|
---|
642 | {
|
---|
643 | ULONG TargetLength;
|
---|
644 | char *Target;
|
---|
645 | } SecPkgContext_Target, *PSecPkgContext_Target;
|
---|
646 |
|
---|
647 | SECURITY_STATUS SEC_ENTRY ImpersonateSecurityContext(PCtxtHandle phContext);
|
---|
648 |
|
---|
649 | typedef SECURITY_STATUS (SEC_ENTRY *IMPERSONATE_SECURITY_CONTEXT_FN)
|
---|
650 | (PCtxtHandle);
|
---|
651 |
|
---|
652 | SECURITY_STATUS SEC_ENTRY RevertSecurityContext(PCtxtHandle phContext);
|
---|
653 |
|
---|
654 | typedef SECURITY_STATUS (SEC_ENTRY *REVERT_SECURITY_CONTEXT_FN)(PCtxtHandle);
|
---|
655 |
|
---|
656 | SECURITY_STATUS SEC_ENTRY MakeSignature(PCtxtHandle phContext,
|
---|
657 | ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo);
|
---|
658 |
|
---|
659 | typedef SECURITY_STATUS (SEC_ENTRY *MAKE_SIGNATURE_FN)(PCtxtHandle,
|
---|
660 | ULONG, PSecBufferDesc, ULONG);
|
---|
661 |
|
---|
662 | SECURITY_STATUS SEC_ENTRY VerifySignature(PCtxtHandle phContext,
|
---|
663 | PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP);
|
---|
664 |
|
---|
665 | typedef SECURITY_STATUS (SEC_ENTRY *VERIFY_SIGNATURE_FN)(PCtxtHandle,
|
---|
666 | PSecBufferDesc, ULONG, PULONG);
|
---|
667 |
|
---|
668 | SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoA(
|
---|
669 | SEC_CHAR *pszPackageName, PSecPkgInfoA *ppPackageInfo);
|
---|
670 | SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoW(
|
---|
671 | SEC_WCHAR *pszPackageName, PSecPkgInfoW *ppPackageInfo);
|
---|
672 | #define QuerySecurityPackageInfo WINELIB_NAME_AW(QuerySecurityPackageInfo)
|
---|
673 |
|
---|
674 | typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_PACKAGE_INFO_FN_A)
|
---|
675 | (SEC_CHAR *, PSecPkgInfoA *);
|
---|
676 | typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_PACKAGE_INFO_FN_W)
|
---|
677 | (SEC_WCHAR *, PSecPkgInfoW *);
|
---|
678 | #define QUERY_SECURITY_PACKAGE_INFO_FN WINELIB_NAME_AW(QUERY_SECURITY_PACKAGE_INFO_FN_)
|
---|
679 |
|
---|
680 | SECURITY_STATUS SEC_ENTRY ExportSecurityContext(PCtxtHandle phContext,
|
---|
681 | ULONG fFlags, PSecBuffer pPackedContext, void **pToken);
|
---|
682 |
|
---|
683 | typedef SECURITY_STATUS (SEC_ENTRY *EXPORT_SECURITY_CONTEXT_FN)(PCtxtHandle,
|
---|
684 | ULONG, PSecBuffer, void **);
|
---|
685 |
|
---|
686 | /* values for ExportSecurityContext fFlags */
|
---|
687 | #define SECPKG_CONTEXT_EXPORT_RESET_NEW 0x00000001
|
---|
688 | #define SECPKG_CONTEXT_EXPORT_DELETE_OLD 0x00000002
|
---|
689 |
|
---|
690 | SECURITY_STATUS SEC_ENTRY ImportSecurityContextA(SEC_CHAR *pszPackage,
|
---|
691 | PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext);
|
---|
692 | SECURITY_STATUS SEC_ENTRY ImportSecurityContextW(SEC_WCHAR *pszPackage,
|
---|
693 | PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext);
|
---|
694 | #define ImportSecurityContext WINELIB_NAME_AW(ImportSecurityContext)
|
---|
695 |
|
---|
696 | typedef SECURITY_STATUS (SEC_ENTRY *IMPORT_SECURITY_CONTEXT_FN_A)(SEC_CHAR *,
|
---|
697 | PSecBuffer, void *, PCtxtHandle);
|
---|
698 | typedef SECURITY_STATUS (SEC_ENTRY *IMPORT_SECURITY_CONTEXT_FN_W)(SEC_WCHAR *,
|
---|
699 | PSecBuffer, void *, PCtxtHandle);
|
---|
700 | #define IMPORT_SECURITY_CONTEXT_FN WINELIB_NAME_AW(IMPORT_SECURITY_CONTEXT_FN_)
|
---|
701 |
|
---|
702 | SECURITY_STATUS SEC_ENTRY AddCredentialsA(PCredHandle hCredentials,
|
---|
703 | SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse,
|
---|
704 | void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
|
---|
705 | PTimeStamp ptsExpiry);
|
---|
706 | SECURITY_STATUS SEC_ENTRY AddCredentialsW(PCredHandle hCredentials,
|
---|
707 | SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse,
|
---|
708 | void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
|
---|
709 | PTimeStamp ptsExpiry);
|
---|
710 | #define AddCredentials WINELIB_NAME_AW(AddCredentials)
|
---|
711 |
|
---|
712 | typedef SECURITY_STATUS (SEC_ENTRY *ADD_CREDENTIALS_FN_A)(PCredHandle,
|
---|
713 | SEC_CHAR *, SEC_CHAR *, ULONG, void *, SEC_GET_KEY_FN, void *,
|
---|
714 | PTimeStamp);
|
---|
715 | typedef SECURITY_STATUS (SEC_ENTRY *ADD_CREDENTIALS_FN_W)(PCredHandle,
|
---|
716 | SEC_WCHAR *, SEC_WCHAR *, ULONG, void *, SEC_GET_KEY_FN, void *,
|
---|
717 | PTimeStamp);
|
---|
718 |
|
---|
719 | SECURITY_STATUS SEC_ENTRY QuerySecurityContextToken(PCtxtHandle phContext,
|
---|
720 | HANDLE *phToken);
|
---|
721 |
|
---|
722 | typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_CONTEXT_TOKEN_FN)
|
---|
723 | (PCtxtHandle, HANDLE *);
|
---|
724 |
|
---|
725 | SECURITY_STATUS SEC_ENTRY EncryptMessage(PCtxtHandle phContext, ULONG fQOP,
|
---|
726 | PSecBufferDesc pMessage, ULONG MessageSeqNo);
|
---|
727 | SECURITY_STATUS SEC_ENTRY DecryptMessage(PCtxtHandle phContext,
|
---|
728 | PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP);
|
---|
729 |
|
---|
730 | /* values for EncryptMessage fQOP */
|
---|
731 | #define SECQOP_WRAP_NO_ENCRYPT 0x80000001
|
---|
732 |
|
---|
733 | typedef SECURITY_STATUS (SEC_ENTRY *ENCRYPT_MESSAGE_FN)(PCtxtHandle, ULONG,
|
---|
734 | PSecBufferDesc, ULONG);
|
---|
735 | typedef SECURITY_STATUS (SEC_ENTRY *DECRYPT_MESSAGE_FN)(PCtxtHandle,
|
---|
736 | PSecBufferDesc, ULONG, PULONG);
|
---|
737 |
|
---|
738 | SECURITY_STATUS SEC_ENTRY SetContextAttributesA(PCtxtHandle phContext,
|
---|
739 | ULONG ulAttribute, void *pBuffer, ULONG cbBuffer);
|
---|
740 | SECURITY_STATUS SEC_ENTRY SetContextAttributesW(PCtxtHandle phContext,
|
---|
741 | ULONG ulAttribute, void *pBuffer, ULONG cbBuffer);
|
---|
742 | #define SetContextAttributes WINELIB_NAME_AW(SetContextAttributes)
|
---|
743 |
|
---|
744 | typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,
|
---|
745 | ULONG, void *, ULONG);
|
---|
746 | typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
|
---|
747 | ULONG, void *, ULONG);
|
---|
748 |
|
---|
749 | #define SECURITY_ENTRYPOINT_ANSIA "InitSecurityInterfaceA"
|
---|
750 | #define SECURITY_ENTRYPOINT_ANSIW "InitSecurityInterfaceW"
|
---|
751 | #define SECURITY_ENTRYPOINT_ANSI WINELIB_NAME_AW(SECURITY_ENTRYPOINT_ANSI)
|
---|
752 |
|
---|
753 | typedef struct _SECURITY_FUNCTION_TABLE_A
|
---|
754 | {
|
---|
755 | ULONG dwVersion;
|
---|
756 | ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA;
|
---|
757 | QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA;
|
---|
758 | ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA;
|
---|
759 | FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
|
---|
760 | void *Reserved2;
|
---|
761 | INITIALIZE_SECURITY_CONTEXT_FN_A InitializeSecurityContextA;
|
---|
762 | ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
|
---|
763 | COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
|
---|
764 | DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
|
---|
765 | APPLY_CONTROL_TOKEN_FN ApplyControlToken;
|
---|
766 | QUERY_CONTEXT_ATTRIBUTES_FN_A QueryContextAttributesA;
|
---|
767 | IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
|
---|
768 | REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
|
---|
769 | MAKE_SIGNATURE_FN MakeSignature;
|
---|
770 | VERIFY_SIGNATURE_FN VerifySignature;
|
---|
771 | FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
|
---|
772 | QUERY_SECURITY_PACKAGE_INFO_FN_A QuerySecurityPackageInfoA;
|
---|
773 | void *Reserved3;
|
---|
774 | void *Reserved4;
|
---|
775 | EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
|
---|
776 | IMPORT_SECURITY_CONTEXT_FN_A ImportSecurityContextA;
|
---|
777 | ADD_CREDENTIALS_FN_A AddCredentialsA;
|
---|
778 | void *Reserved8;
|
---|
779 | QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
|
---|
780 | ENCRYPT_MESSAGE_FN EncryptMessage;
|
---|
781 | DECRYPT_MESSAGE_FN DecryptMessage;
|
---|
782 | SET_CONTEXT_ATTRIBUTES_FN_A SetContextAttributesA;
|
---|
783 | } SecurityFunctionTableA, *PSecurityFunctionTableA;
|
---|
784 |
|
---|
785 | typedef struct _SECURITY_FUNCTION_TABLE_W
|
---|
786 | {
|
---|
787 | ULONG dwVersion;
|
---|
788 | ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW;
|
---|
789 | QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW;
|
---|
790 | ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW;
|
---|
791 | FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
|
---|
792 | void *Reserved2;
|
---|
793 | INITIALIZE_SECURITY_CONTEXT_FN_W InitializeSecurityContextW;
|
---|
794 | ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
|
---|
795 | COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
|
---|
796 | DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
|
---|
797 | APPLY_CONTROL_TOKEN_FN ApplyControlToken;
|
---|
798 | QUERY_CONTEXT_ATTRIBUTES_FN_W QueryContextAttributesW;
|
---|
799 | IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
|
---|
800 | REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
|
---|
801 | MAKE_SIGNATURE_FN MakeSignature;
|
---|
802 | VERIFY_SIGNATURE_FN VerifySignature;
|
---|
803 | FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
|
---|
804 | QUERY_SECURITY_PACKAGE_INFO_FN_W QuerySecurityPackageInfoW;
|
---|
805 | void *Reserved3;
|
---|
806 | void *Reserved4;
|
---|
807 | EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
|
---|
808 | IMPORT_SECURITY_CONTEXT_FN_W ImportSecurityContextW;
|
---|
809 | ADD_CREDENTIALS_FN_W AddCredentialsW;
|
---|
810 | void *Reserved8;
|
---|
811 | QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
|
---|
812 | ENCRYPT_MESSAGE_FN EncryptMessage;
|
---|
813 | DECRYPT_MESSAGE_FN DecryptMessage;
|
---|
814 | SET_CONTEXT_ATTRIBUTES_FN_W SetContextAttributesW;
|
---|
815 | } SecurityFunctionTableW, *PSecurityFunctionTableW;
|
---|
816 |
|
---|
817 | #define SecurityFunctionTable WINELIB_NAME_AW(SecurityFunctionTable)
|
---|
818 | #define PSecurityFunctionTable WINELIB_NAME_AW(PSecurityFunctionTable)
|
---|
819 |
|
---|
820 | #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION 1
|
---|
821 | #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 2
|
---|
822 |
|
---|
823 | PSecurityFunctionTableA SEC_ENTRY InitSecurityInterfaceA(void);
|
---|
824 | PSecurityFunctionTableW SEC_ENTRY InitSecurityInterfaceW(void);
|
---|
825 | #define InitSecurityInterface WINELIB_NAME_AW(InitSecurityInterface)
|
---|
826 |
|
---|
827 | typedef PSecurityFunctionTableA (SEC_ENTRY *INIT_SECURITY_INTERFACE_A)(void);
|
---|
828 | typedef PSecurityFunctionTableW (SEC_ENTRY *INIT_SECURITY_INTERFACE_W)(void);
|
---|
829 | #define INIT_SECURITY_INTERFACE WINELIB_NAME_AW(INIT_SECURITY_INTERFACE_)
|
---|
830 |
|
---|
831 | #ifdef __cplusplus
|
---|
832 | }
|
---|
833 | #endif
|
---|
834 |
|
---|
835 | #endif /* ndef __WINE_SSPI_H__ */
|
---|