wine/test.h: Identify the process responsible for test summary lines.
[wine.git] / include / sspi.h
blob0e248fbef0599569f52ba3e1d5f7ece4e2104f72
1 /*
2 * Copyright (C) 2004 Juan Lang
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.
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.
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
18 #ifndef __WINE_SSPI_H__
19 #define __WINE_SSPI_H__
21 /* FIXME: #include <sdkddkver.h> */
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 #define SEC_ENTRY __stdcall
29 typedef WCHAR SEC_WCHAR;
30 typedef CHAR SEC_CHAR;
32 #ifndef __SECSTATUS_DEFINED__
33 #define __SECSTATUS_DEFINED__
34 typedef LONG SECURITY_STATUS;
35 #endif
37 #ifdef UNICODE
38 typedef SEC_WCHAR * SECURITY_PSTR;
39 typedef const SEC_WCHAR * SECURITY_PCSTR;
40 #else
41 typedef SEC_CHAR * SECURITY_PSTR;
42 typedef const SEC_CHAR * SECURITY_PCSTR;
43 #endif
45 #ifndef __SECHANDLE_DEFINED__
46 #define __SECHANDLE_DEFINED__
47 typedef struct _SecHandle
49 ULONG_PTR dwLower;
50 ULONG_PTR dwUpper;
51 } SecHandle, *PSecHandle;
52 #endif
54 #define SecInvalidateHandle(x) do { \
55 ((PSecHandle)(x))->dwLower = ((ULONG_PTR)((INT_PTR)-1)); \
56 ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR)-1)); \
57 } while (0)
59 #define SecIsValidHandle(x) \
60 ((((PSecHandle)(x))->dwLower != ((ULONG_PTR)(INT_PTR)-1)) && \
61 (((PSecHandle)(x))->dwUpper != ((ULONG_PTR)(INT_PTR)-1)))
63 typedef SecHandle CredHandle;
64 typedef PSecHandle PCredHandle;
66 #ifndef __WINE_CTXTHANDLE_DEFINED__
67 #define __WINE_CTXTHANDLE_DEFINED__
68 typedef SecHandle CtxtHandle;
69 typedef PSecHandle PCtxtHandle;
70 #endif
72 typedef struct _SECURITY_INTEGER
74 ULONG LowPart;
75 LONG HighPart;
76 } SECURITY_INTEGER, *PSECURITY_INTEGER;
77 typedef SECURITY_INTEGER TimeStamp, *PTimeStamp;
79 #ifndef __UNICODE_STRING_DEFINED__
80 #define __UNICODE_STRING_DEFINED__
81 typedef struct _UNICODE_STRING {
82 USHORT Length; /* bytes */
83 USHORT MaximumLength; /* bytes */
84 PWSTR Buffer;
85 } UNICODE_STRING, *PUNICODE_STRING;
86 #endif
88 typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;
90 #define SSPIPFC_CREDPROV_DO_NOT_SAVE 0x00000001
91 #define SSPIPFC_NO_CHECKBOX 0x00000002
93 typedef void *PSEC_WINNT_AUTH_IDENTITY_OPAQUE;
95 SECURITY_STATUS SEC_ENTRY SspiEncodeAuthIdentityAsStrings(
96 PSEC_WINNT_AUTH_IDENTITY_OPAQUE, PCWSTR *, PCWSTR *, PCWSTR *);
98 SECURITY_STATUS SEC_ENTRY SspiEncodeStringsAsAuthIdentity(
99 PCWSTR, PCWSTR, PCWSTR, PSEC_WINNT_AUTH_IDENTITY_OPAQUE *);
101 SECURITY_STATUS SEC_ENTRY SspiPrepareForCredWrite(
102 PSEC_WINNT_AUTH_IDENTITY_OPAQUE, PCWSTR, PULONG, PCWSTR*, PCWSTR*, PUCHAR*, PULONG);
104 ULONG SEC_ENTRY SspiPromptForCredentialsA(PCSTR, void *,
105 ULONG, PCSTR, PSEC_WINNT_AUTH_IDENTITY_OPAQUE,
106 PSEC_WINNT_AUTH_IDENTITY_OPAQUE *, int *, ULONG);
107 ULONG SEC_ENTRY SspiPromptForCredentialsW(PCWSTR, void *,
108 ULONG, PCWSTR, PSEC_WINNT_AUTH_IDENTITY_OPAQUE,
109 PSEC_WINNT_AUTH_IDENTITY_OPAQUE *, int *, ULONG);
110 #define SspiPromptForCredentials WINELIB_NAME_AW(SspiPromptForCredentials)
112 void SEC_ENTRY SspiFreeAuthIdentity(PSEC_WINNT_AUTH_IDENTITY_OPAQUE);
113 void SEC_ENTRY SspiLocalFree(void *);
114 void SEC_ENTRY SspiZeroAuthIdentity(PSEC_WINNT_AUTH_IDENTITY_OPAQUE);
116 typedef struct _SecPkgInfoA
118 ULONG fCapabilities;
119 USHORT wVersion;
120 USHORT wRPCID;
121 ULONG cbMaxToken;
122 SEC_CHAR *Name;
123 SEC_CHAR *Comment;
124 } SecPkgInfoA, *PSecPkgInfoA;
126 typedef struct _SecPkgInfoW
128 ULONG fCapabilities;
129 USHORT wVersion;
130 USHORT wRPCID;
131 ULONG cbMaxToken;
132 SEC_WCHAR *Name;
133 SEC_WCHAR *Comment;
134 } SecPkgInfoW, *PSecPkgInfoW;
136 typedef struct _SECURITY_PACKAGE_OPTIONS {
137 ULONG Size;
138 ULONG Type;
139 ULONG Flags;
140 ULONG SignatureSize;
141 void *Signature;
142 } SECURITY_PACKAGE_OPTIONS, *PSECURITY_PACKAGE_OPTIONS;
144 SECURITY_STATUS WINAPI AddSecurityPackageA(LPSTR,SECURITY_PACKAGE_OPTIONS*);
145 SECURITY_STATUS WINAPI AddSecurityPackageW(LPWSTR,SECURITY_PACKAGE_OPTIONS*);
146 #define AddSecurityPackage WINELIB_NAME_AW(AddSecurityPackage)
148 #define SecPkgInfo WINELIB_NAME_AW(SecPkgInfo)
149 #define PSecPkgInfo WINELIB_NAME_AW(PSecPkgInfo)
151 /* fCapabilities field of SecPkgInfo */
152 #define SECPKG_FLAG_INTEGRITY 0x00000001
153 #define SECPKG_FLAG_PRIVACY 0x00000002
154 #define SECPKG_FLAG_TOKEN_ONLY 0x00000004
155 #define SECPKG_FLAG_DATAGRAM 0x00000008
156 #define SECPKG_FLAG_CONNECTION 0x00000010
157 #define SECPKG_FLAG_MULTI_REQUIRED 0x00000020
158 #define SECPKG_FLAG_CLIENT_ONLY 0x00000040
159 #define SECPKG_FLAG_EXTENDED_ERROR 0x00000080
160 #define SECPKG_FLAG_IMPERSONATION 0x00000100
161 #define SECPKG_FLAG_ACCEPT_WIN32_NAME 0x00000200
162 #define SECPKG_FLAG_STREAM 0x00000400
163 #define SECPKG_FLAG_NEGOTIABLE 0x00000800
164 #define SECPKG_FLAG_GSS_COMPATIBLE 0x00001000
165 #define SECPKG_FLAG_LOGON 0x00002000
166 #define SECPKG_FLAG_ASCII_BUFFERS 0x00004000
167 #define SECPKG_FLAG_FRAGMENT 0x00008000
168 #define SECPKG_FLAG_MUTUAL_AUTH 0x00010000
169 #define SECPKG_FLAG_DELEGATION 0x00020000
170 #define SECPKG_FLAG_READONLY_WITH_CHECKSUM 0x00040000
171 #define SECPKG_FLAG_RESTRICTED_TOKENS 0x00080000
172 #define SECPKG_FLAG_NEGO_EXTENDER 0x00100000
173 #define SECPKG_FLAG_NEGOTIABLE2 0x00200000
174 #define SECPKG_FLAG_APPCONTAINER_PASSTHROUGH 0x00400000
175 #define SECPKG_FLAG_APPCONTAINER_CHECKS 0x00800000
177 #define SECPKG_ID_NONE 0xffff
179 typedef struct _SecBuffer
181 ULONG cbBuffer;
182 ULONG BufferType;
183 PVOID pvBuffer;
184 } SecBuffer, *PSecBuffer;
186 /* values for BufferType */
187 #define SECBUFFER_EMPTY 0
188 #define SECBUFFER_DATA 1
189 #define SECBUFFER_TOKEN 2
190 #define SECBUFFER_PKG_PARAMS 3
191 #define SECBUFFER_MISSING 4
192 #define SECBUFFER_EXTRA 5
193 #define SECBUFFER_STREAM_TRAILER 6
194 #define SECBUFFER_STREAM_HEADER 7
195 #define SECBUFFER_NEGOTIATION_INFO 8
196 #define SECBUFFER_PADDING 9
197 #define SECBUFFER_STREAM 10
198 #define SECBUFFER_MECHLIST 11
199 #define SECBUFFER_MECHLIST_SIGNATURE 12
200 #define SECBUFFER_TARGET 13
201 #define SECBUFFER_CHANNEL_BINDINGS 14
203 #define SECBUFFER_ATTRMASK 0xf0000000
204 #define SECBUFFER_READONLY 0x80000000
205 #define SECBUFFER_READONLY_WITH_CHECKSUM 0x10000000
206 #define SECBUFFER_RESERVED 0x60000000
208 typedef struct _SecBufferDesc
210 ULONG ulVersion;
211 ULONG cBuffers;
212 PSecBuffer pBuffers;
213 } SecBufferDesc, *PSecBufferDesc;
215 /* values for ulVersion */
216 #define SECBUFFER_VERSION 0
218 typedef void (SEC_ENTRY *SEC_GET_KEY_FN)(void *Arg, void *Principal,
219 ULONG KeyVer, void **Key, SECURITY_STATUS *Status);
221 SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesA(PULONG pcPackages,
222 PSecPkgInfoA *ppPackageInfo);
223 SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesW(PULONG pcPackages,
224 PSecPkgInfoW *ppPackageInfo);
225 #define EnumerateSecurityPackages WINELIB_NAME_AW(EnumerateSecurityPackages)
227 typedef SECURITY_STATUS (SEC_ENTRY *ENUMERATE_SECURITY_PACKAGES_FN_A)(PULONG,
228 PSecPkgInfoA *);
229 typedef SECURITY_STATUS (SEC_ENTRY *ENUMERATE_SECURITY_PACKAGES_FN_W)(PULONG,
230 PSecPkgInfoW *);
231 #define ENUMERATE_SECURITY_PACKAGES_FN WINELIB_NAME_AW(ENUMERATE_SECURITY_PACKAGES_FN_)
233 SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesA(
234 PCredHandle phCredential, ULONG ulAttribute, void *pBuffer);
235 SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesW(
236 PCredHandle phCredential, ULONG ulAttribute, void *pBuffer);
237 #define QueryCredentialsAttributes WINELIB_NAME_AW(QueryCredentialsAttributes)
239 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CREDENTIALS_ATTRIBUTES_FN_A)
240 (PCredHandle, ULONG, PVOID);
241 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CREDENTIALS_ATTRIBUTES_FN_W)
242 (PCredHandle, ULONG, PVOID);
243 #define QUERY_CREDENTIALS_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CREDENTIALS_ATTRIBUTES_FN_)
245 typedef struct _SEC_CHANNEL_BINDINGS {
246 ULONG dwInitiatorAddrType;
247 ULONG cbInitiatorLength;
248 ULONG dwInitiatorOffset;
249 ULONG dwAcceptorAddrType;
250 ULONG cbAcceptorLength;
251 ULONG dwAcceptorOffset;
252 ULONG cbApplicationDataLength;
253 ULONG dwApplicationDataOffset;
254 } SEC_CHANNEL_BINDINGS, *PSEC_CHANNEL_BINDINGS;
256 /* values for QueryCredentialsAttributes ulAttribute */
257 #define SECPKG_CRED_ATTR_NAMES 1
259 /* types for QueryCredentialsAttributes */
260 typedef struct _SecPkgCredentials_NamesA
262 SEC_CHAR *sUserName;
263 } SecPkgCredentials_NamesA, *PSecPkgCredentials_NamesA;
265 typedef struct _SecPkgCredentials_NamesW
267 SEC_WCHAR *sUserName;
268 } SecPkgCredentials_NamesW, *PSecPkgCredentials_NamesW;
270 #define SecPkgCredentials_Names WINELIB_NAME_AW(SecPkgCredentials_Names)
272 SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleA(
273 SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse,
274 PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
275 PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry);
276 SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleW(
277 SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse,
278 PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
279 PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry);
280 #define AcquireCredentialsHandle WINELIB_NAME_AW(AcquireCredentialsHandle)
282 /* flags for fCredentialsUse */
283 #define SECPKG_CRED_INBOUND 0x00000001
284 #define SECPKG_CRED_OUTBOUND 0x00000002
285 #define SECPKG_CRED_BOTH (SECPKG_CRED_INBOUND | SECPKG_CRED_OUTBOUND)
286 #define SECPKG_CRED_DEFAULT 0x00000004
287 #define SECPKG_CRED_RESERVED 0xf0000000
289 typedef SECURITY_STATUS (SEC_ENTRY *ACQUIRE_CREDENTIALS_HANDLE_FN_A)(
290 SEC_CHAR *, SEC_CHAR *, ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID,
291 PCredHandle, PTimeStamp);
292 typedef SECURITY_STATUS (SEC_ENTRY *ACQUIRE_CREDENTIALS_HANDLE_FN_W)(
293 SEC_WCHAR *, SEC_WCHAR *, ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID,
294 PCredHandle, PTimeStamp);
295 #define ACQUIRE_CREDENTIALS_HANDLE_FN WINELIB_NAME_AW(ACQUIRE_CREDENTIALS_HANDLE_FN_)
297 SECURITY_STATUS SEC_ENTRY FreeContextBuffer(PVOID pv);
299 typedef SECURITY_STATUS (SEC_ENTRY *FREE_CONTEXT_BUFFER_FN)(PVOID);
301 SECURITY_STATUS SEC_ENTRY FreeCredentialsHandle(PCredHandle
302 phCredential);
304 #define FreeCredentialHandle FreeCredentialsHandle
306 typedef SECURITY_STATUS (SEC_ENTRY *FREE_CREDENTIALS_HANDLE_FN)(PCredHandle);
308 SECURITY_STATUS SEC_ENTRY InitializeSecurityContextA(
309 PCredHandle phCredential, PCtxtHandle phContext,
310 SEC_CHAR *pszTargetName, ULONG fContextReq,
311 ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
312 ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
313 ULONG *pfContextAttr, PTimeStamp ptsExpiry);
314 SECURITY_STATUS SEC_ENTRY InitializeSecurityContextW(
315 PCredHandle phCredential, PCtxtHandle phContext,
316 SEC_WCHAR *pszTargetName, ULONG fContextReq,
317 ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
318 ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
319 ULONG *pfContextAttr, PTimeStamp ptsExpiry);
320 #define InitializeSecurityContext WINELIB_NAME_AW(InitializeSecurityContext)
322 typedef SECURITY_STATUS (SEC_ENTRY *INITIALIZE_SECURITY_CONTEXT_FN_A)
323 (PCredHandle, PCtxtHandle, SEC_CHAR *, ULONG, ULONG, ULONG, PSecBufferDesc,
324 ULONG, PCtxtHandle, PSecBufferDesc, ULONG *, PTimeStamp);
325 typedef SECURITY_STATUS (SEC_ENTRY *INITIALIZE_SECURITY_CONTEXT_FN_W)
326 (PCredHandle, PCtxtHandle, SEC_WCHAR *, ULONG, ULONG, ULONG, PSecBufferDesc,
327 ULONG, PCtxtHandle, PSecBufferDesc, ULONG *, PTimeStamp);
328 #define INITIALIZE_SECURITY_CONTEXT_FN WINELIB_NAME_AW(INITIALIZE_SECURITY_CONTEXT_FN_)
330 /* flags for InitializeSecurityContext fContextReq and pfContextAttr */
331 #define ISC_REQ_DELEGATE 0x00000001
332 #define ISC_REQ_MUTUAL_AUTH 0x00000002
333 #define ISC_REQ_REPLAY_DETECT 0x00000004
334 #define ISC_REQ_SEQUENCE_DETECT 0x00000008
335 #define ISC_REQ_CONFIDENTIALITY 0x00000010
336 #define ISC_REQ_USE_SESSION_KEY 0x00000020
337 #define ISC_REQ_PROMPT_FOR_CREDS 0x00000040
338 #define ISC_REQ_USE_SUPPLIED_CREDS 0x00000080
339 #define ISC_REQ_ALLOCATE_MEMORY 0x00000100
340 #define ISC_REQ_USE_DCE_STYLE 0x00000200
341 #define ISC_REQ_DATAGRAM 0x00000400
342 #define ISC_REQ_CONNECTION 0x00000800
343 #define ISC_REQ_CALL_LEVEL 0x00001000
344 #define ISC_REQ_FRAGMENT_SUPPLIED 0x00002000
345 #define ISC_REQ_EXTENDED_ERROR 0x00004000
346 #define ISC_REQ_STREAM 0x00008000
347 #define ISC_REQ_INTEGRITY 0x00010000
348 #define ISC_REQ_IDENTIFY 0x00020000
349 #define ISC_REQ_NULL_SESSION 0x00040000
350 #define ISC_REQ_MANUAL_CRED_VALIDATION 0x00080000
351 #define ISC_REQ_RESERVED1 0x00100000
352 #define ISC_REQ_FRAGMENT_TO_FIT 0x00200000
354 #define ISC_RET_DELEGATE 0x00000001
355 #define ISC_RET_MUTUAL_AUTH 0x00000002
356 #define ISC_RET_REPLAY_DETECT 0x00000004
357 #define ISC_RET_SEQUENCE_DETECT 0x00000008
358 #define ISC_RET_CONFIDENTIALITY 0x00000010
359 #define ISC_RET_USE_SESSION_KEY 0x00000020
360 #define ISC_RET_USED_COLLECTED_CREDS 0x00000040
361 #define ISC_RET_USED_SUPPLIED_CREDS 0x00000080
362 #define ISC_RET_ALLOCATED_MEMORY 0x00000100
363 #define ISC_RET_USED_DCE_STYLE 0x00000200
364 #define ISC_RET_DATAGRAM 0x00000400
365 #define ISC_RET_CONNECTION 0x00000800
366 #define ISC_RET_INTERMEDIATE_RETURN 0x00001000
367 #define ISC_RET_CALL_LEVEL 0x00002000
368 #define ISC_RET_EXTENDED_ERROR 0x00004000
369 #define ISC_RET_STREAM 0x00008000
370 #define ISC_RET_INTEGRITY 0x00010000
371 #define ISC_RET_IDENTIFY 0x00020000
372 #define ISC_RET_NULL_SESSION 0x00040000
373 #define ISC_RET_MANUAL_CRED_VALIDATION 0x00080000
374 #define ISC_RET_RESERVED1 0x00100000
375 #define ISC_RET_FRAGMENT_ONLY 0x00200000
377 SECURITY_STATUS SEC_ENTRY AcceptSecurityContext(
378 PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput,
379 ULONG fContextReq, ULONG TargetDataRep,
380 PCtxtHandle phNewContext, PSecBufferDesc pOutput,
381 ULONG *pfContextAttr, PTimeStamp ptsExpiry);
383 typedef SECURITY_STATUS (SEC_ENTRY *ACCEPT_SECURITY_CONTEXT_FN)(PCredHandle,
384 PCtxtHandle, PSecBufferDesc, ULONG, ULONG, PCtxtHandle,
385 PSecBufferDesc, ULONG *, PTimeStamp);
387 /* flags for AcceptSecurityContext fContextReq and pfContextAttr */
388 #define ASC_REQ_DELEGATE 0x00000001
389 #define ASC_REQ_MUTUAL_AUTH 0x00000002
390 #define ASC_REQ_REPLAY_DETECT 0x00000004
391 #define ASC_REQ_SEQUENCE_DETECT 0x00000008
392 #define ASC_REQ_CONFIDENTIALITY 0x00000010
393 #define ASC_REQ_USE_SESSION_KEY 0x00000020
394 #define ASC_REQ_ALLOCATE_MEMORY 0x00000100
395 #define ASC_REQ_USE_DCE_STYLE 0x00000200
396 #define ASC_REQ_DATAGRAM 0x00000400
397 #define ASC_REQ_CONNECTION 0x00000800
398 #define ASC_REQ_CALL_LEVEL 0x00001000
399 #define ASC_REQ_FRAGMENT_SUPPLIED 0x00002000
400 #define ASC_REQ_EXTENDED_ERROR 0x00008000
401 #define ASC_REQ_STREAM 0x00010000
402 #define ASC_REQ_INTEGRITY 0x00020000
403 #define ASC_REQ_LICENSING 0x00040000
404 #define ASC_REQ_IDENTIFY 0x00080000
405 #define ASC_REQ_ALLOW_NULL_SESSION 0x00100000
406 #define ASC_REQ_ALLOW_NON_USER_LOGONS 0x00200000
407 #define ASC_REQ_ALLOW_CONTEXT_REPLAY 0x00400000
408 #define ASC_REQ_FRAGMENT_TO_FIT 0x00800000
409 #define ASC_REQ_FRAGMENT_NO_TOKEN 0x01000000
411 #define ASC_RET_DELEGATE 0x00000001
412 #define ASC_RET_MUTUAL_AUTH 0x00000002
413 #define ASC_RET_REPLAY_DETECT 0x00000004
414 #define ASC_RET_SEQUENCE_DETECT 0x00000008
415 #define ASC_RET_CONFIDENTIALITY 0x00000010
416 #define ASC_RET_USE_SESSION_KEY 0x00000020
417 #define ASC_RET_ALLOCATED_MEMORY 0x00000100
418 #define ASC_RET_USED_DCE_STYLE 0x00000200
419 #define ASC_RET_DATAGRAM 0x00000400
420 #define ASC_RET_CONNECTION 0x00000800
421 #define ASC_RET_CALL_LEVEL 0x00002000
422 #define ASC_RET_THIRD_LEG_FAILED 0x00004000
423 #define ASC_RET_EXTENDED_ERROR 0x00008000
424 #define ASC_RET_STREAM 0x00010000
425 #define ASC_RET_INTEGRITY 0x00020000
426 #define ASC_RET_LICENSING 0x00040000
427 #define ASC_RET_IDENTIFY 0x00080000
428 #define ASC_RET_NULL_SESSION 0x00100000
429 #define ASC_RET_ALLOW_NON_USER_LOGONS 0x00200000
430 #define ASC_RET_ALLOW_CONTEXT_REPLAY 0x00400000
431 #define ASC_RET_FRAGMENT_ONLY 0x00800000
432 #define ASC_RET_NO_TOKEN 0x01000000
434 /* values for TargetDataRep */
435 #define SECURITY_NATIVE_DREP 0x00000010
436 #define SECURITY_NETWORK_DREP 0x00000000
438 SECURITY_STATUS SEC_ENTRY CompleteAuthToken(PCtxtHandle phContext,
439 PSecBufferDesc pToken);
441 typedef SECURITY_STATUS (SEC_ENTRY *COMPLETE_AUTH_TOKEN_FN)(PCtxtHandle,
442 PSecBufferDesc);
444 SECURITY_STATUS SEC_ENTRY DeleteSecurityContext(PCtxtHandle phContext);
446 typedef SECURITY_STATUS (SEC_ENTRY *DELETE_SECURITY_CONTEXT_FN)(PCtxtHandle);
448 SECURITY_STATUS SEC_ENTRY ApplyControlToken(PCtxtHandle phContext,
449 PSecBufferDesc pInput);
451 typedef SECURITY_STATUS (SEC_ENTRY *APPLY_CONTROL_TOKEN_FN)(PCtxtHandle,
452 PSecBufferDesc);
454 SECURITY_STATUS SEC_ENTRY QueryContextAttributesA(PCtxtHandle phContext,
455 ULONG ulAttribute, void *pBuffer);
456 SECURITY_STATUS SEC_ENTRY QueryContextAttributesW(PCtxtHandle phContext,
457 ULONG ulAttribute, void *pBuffer);
458 #define QueryContextAttributes WINELIB_NAME_AW(QueryContextAttributes)
460 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,
461 ULONG, void *);
462 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
463 ULONG, void *);
464 #define QUERY_CONTEXT_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CONTEXT_ATTRIBUTES_FN_)
466 /* values for QueryContextAttributes/SetContextAttributes ulAttribute */
467 #define SECPKG_ATTR_SIZES 0
468 #define SECPKG_ATTR_NAMES 1
469 #define SECPKG_ATTR_LIFESPAN 2
470 #define SECPKG_ATTR_DCE_INFO 3
471 #define SECPKG_ATTR_STREAM_SIZES 4
472 #define SECPKG_ATTR_KEY_INFO 5
473 #define SECPKG_ATTR_AUTHORITY 6
474 #define SECPKG_ATTR_PROTO_INFO 7
475 #define SECPKG_ATTR_PASSWORD_EXPIRY 8
476 #define SECPKG_ATTR_SESSION_KEY 9
477 #define SECPKG_ATTR_PACKAGE_INFO 10
478 #define SECPKG_ATTR_USER_FLAGS 11
479 #define SECPKG_ATTR_NEGOTIATION_INFO 12
480 #define SECPKG_ATTR_NATIVE_NAMES 13
481 #define SECPKG_ATTR_FLAGS 14
482 #define SECPKG_ATTR_USE_VALIDATED 15
483 #define SECPKG_ATTR_CREDENTIAL_NAME 16
484 #define SECPKG_ATTR_TARGET_INFORMATION 17
485 #define SECPKG_ATTR_ACCESS_TOKEN 18
486 #define SECPKG_ATTR_TARGET 19
487 #define SECPKG_ATTR_AUTHENTICATION_ID 20
488 #define SECPKG_ATTR_LOGOFF_TIME 21
489 #define SECPKG_ATTR_NEGO_KEYS 22
490 #define SECPKG_ATTR_PROMPTING_NEEDED 24
491 #define SECPKG_ATTR_UNIQUE_BINDINGS 25
492 #define SECPKG_ATTR_ENDPOINT_BINDINGS 26
493 #define SECPKG_ATTR_CLIENT_SPECIFIED_TARGET 27
494 #define SECPKG_ATTR_LAST_CLIENT_TOKEN_STATUS 30
495 #define SECPKG_ATTR_NEGO_PKG_INFO 31
496 #define SECPKG_ATTR_NEGO_STATUS 32
497 #define SECPKG_ATTR_CONTEXT_DELETED 33
499 #define SECPKG_ATTR_SUBJECT_SECURITY_ATTRIBUTES 128
500 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_KERBEROS 0x1
501 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_NTLM 0x2
503 /* types for QueryContextAttributes/SetContextAttributes */
505 typedef struct _SecPkgContext_Sizes
507 ULONG cbMaxToken;
508 ULONG cbMaxSignature;
509 ULONG cbBlockSize;
510 ULONG cbSecurityTrailer;
511 } SecPkgContext_Sizes, *PSecPkgContext_Sizes;
513 typedef struct _SecPkgContext_StreamSizes
515 ULONG cbHeader;
516 ULONG cbTrailer;
517 ULONG cbMaximumMessage;
518 ULONG cbBuffers;
519 ULONG cbBlockSize;
520 } SecPkgContext_StreamSizes, *PSecPkgContext_StreamSizes;
522 typedef struct _SecPkgContext_NamesA
524 SEC_CHAR *sUserName;
525 } SecPkgContext_NamesA, *PSecPkgContext_NamesA;
527 typedef struct _SecPkgContext_NamesW
529 SEC_WCHAR *sUserName;
530 } SecPkgContext_NamesW, *PSecPkgContext_NamesW;
532 #define SecPkgContext_Names WINELIB_NAME_AW(SecPkgContext_Names)
533 #define PSecPkgContext_Names WINELIB_NAME_AW(PSecPkgContext_Names)
535 typedef struct _SecPkgContext_Lifespan
537 TimeStamp tsStart;
538 TimeStamp tsExpiry;
539 } SecPkgContext_Lifespan, *PSecPkgContext_Lifespan;
541 typedef struct _SecPkgContext_DceInfo
543 ULONG AuthzSvc;
544 PVOID pPac;
545 } SecPkgContext_DceInfo, *PSecPkgContext_DceInfo;
547 typedef struct _SecPkgContext_KeyInfoA
549 SEC_CHAR *sSignatureAlgorithmName;
550 SEC_CHAR *sEncryptAlgorithmName;
551 ULONG KeySize;
552 ULONG SignatureAlgorithm;
553 ULONG EncryptAlgorithm;
554 } SecPkgContext_KeyInfoA, *PSecPkgContext_KeyInfoA;
556 typedef struct _SecPkgContext_KeyInfoW
558 SEC_WCHAR *sSignatureAlgorithmName;
559 SEC_WCHAR *sEncryptAlgorithmName;
560 ULONG KeySize;
561 ULONG SignatureAlgorithm;
562 ULONG EncryptAlgorithm;
563 } SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW;
565 #define SecPkgContext_KeyInfo WINELIB_NAME_AW(SecPkgContext_KeyInfo)
566 #define PSecPkgContext_KeyInfo WINELIB_NAME_AW(PSecPkgContext_KeyInfo)
568 typedef struct _SecPkgContext_AuthorityA
570 SEC_CHAR *sAuthorityName;
571 } SecPkgContext_AuthorityA, *PSecPkgContext_AuthorityA;
573 typedef struct _SecPkgContext_AuthorityW
575 SEC_WCHAR *sAuthorityName;
576 } SecPkgContext_AuthorityW, *PSecPkgContext_AuthorityW;
578 #define SecPkgContext_Authority WINELIB_NAME_AW(SecPkgContext_Authority)
579 #define PSecPkgContext_Authority WINELIB_NAME_AW(PSecPkgContext_Authority)
581 typedef struct _SecPkgContext_ProtoInfoA
583 SEC_CHAR *sProtocolName;
584 ULONG majorVersion;
585 ULONG minorVersion;
586 } SecPkgContext_ProtoInfoA, *PSecPkgContext_ProtoInfoA;
588 typedef struct _SecPkgContext_ProtoInfoW
590 SEC_WCHAR *sProtocolName;
591 ULONG majorVersion;
592 ULONG minorVersion;
593 } SecPkgContext_ProtoInfoW, *PSecPkgContext_ProtoInfoW;
595 #define SecPkgContext_ProtoInfo WINELIB_NAME_AW(SecPkgContext_ProtoInfo)
596 #define PSecPkgContext_ProtoInfo WINELIB_NAME_AW(PSecPkgContext_ProtoInfo)
598 typedef struct _SecPkgContext_PasswordExpiry
600 TimeStamp tsPasswordExpires;
601 } SecPkgContext_PasswordExpiry, *PSecPkgContext_PasswordExpiry;
603 typedef struct _SecPkgContext_SessionKey
605 ULONG SessionKeyLength;
606 unsigned char *SessionKey;
607 } SecPkgContext_SessionKey, *PSecPkgContext_SessionKey;
609 typedef struct _SecPkgContext_PackageInfoA
611 PSecPkgInfoA PackageInfo;
612 } SecPkgContext_PackageInfoA, *PSecPkgContext_PackageInfoA;
614 typedef struct _SecPkgContext_PackageInfoW
616 PSecPkgInfoW PackageInfo;
617 } SecPkgContext_PackageInfoW, *PSecPkgContext_PackageInfoW;
619 #define SecPkgContext_PackageInfo WINELIB_NAME_AW(SecPkgContext_PackageInfo)
620 #define PSecPkgContext_PackageInfo WINELIB_NAME_AW(PSecPkgContext_PackageInfo)
622 typedef struct _SecPkgContext_Flags
624 ULONG Flags;
625 } SecPkgContext_Flags, *PSecPkgContext_Flags;
627 typedef struct _SecPkgContext_UserFlags
629 ULONG UserFlags;
630 } SecPkgContext_UserFlags, *PSecPkgContext_UserFlags;
632 typedef struct _SecPkgContext_NegotiationInfoA
634 PSecPkgInfoA PackageInfo;
635 ULONG NegotiationState;
636 } SecPkgContext_NegotiationInfoA, *PSecPkgContext_NegotiationInfoA;
638 typedef struct _SecPkgContext_NegotiationInfoW
640 PSecPkgInfoW PackageInfo;
641 ULONG NegotiationState;
642 } SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW;
644 #define SecPkgContext_NegotiationInfo WINELIB_NAME_AW(SecPkgContext_NegotiationInfo)
645 #define PSecPkgContext_NegotiationInfo WINELIB_NAME_AW(PSecPkgContext_NegotiationInfo)
647 /* values for NegotiationState */
648 #define SECPKG_NEGOTIATION_COMPLETE 0
649 #define SECPKG_NEGOTIATION_OPTIMISTIC 1
650 #define SECPKG_NEGOTIATION_IN_PROGRESS 2
651 #define SECPKG_NEGOTIATION_DIRECT 3
652 #define SECPKG_NEGOTIATION_TRY_MULTICRED 4
654 typedef struct _SecPkgContext_NativeNamesA
656 SEC_CHAR *sClientName;
657 SEC_CHAR *sServerName;
658 } SecPkgContext_NativeNamesA, *PSecPkgContext_NativeNamesA;
660 typedef struct _SecPkgContext_NativeNamesW
662 SEC_WCHAR *sClientName;
663 SEC_WCHAR *sServerName;
664 } SecPkgContext_NativeNamesW, *PSecPkgContext_NativeNamesW;
666 #define SecPkgContext_NativeNames WINELIB_NAME_AW(SecPkgContext_NativeNames)
667 #define PSecPkgContext_NativeNames WINELIB_NAME_AW(PSecPkgContext_NativeNames)
669 typedef struct _SecPkgContext_CredentialNameA
671 ULONG CredentialType;
672 SEC_CHAR *sCredentialName;
673 } SecPkgContext_CredentialNameA, *PSecPkgContext_CredentialNameA;
675 typedef struct _SecPkgContext_CredentialNameW
677 ULONG CredentialType;
678 SEC_WCHAR *sCredentialName;
679 } SecPkgContext_CredentialNameW, *PSecPkgContext_CredentialNameW;
681 #define SecPkgContext_CredentialName WINELIB_NAME_AW(SecPkgContext_CredentialName)
682 #define PSecPkgContext_CredentialName WINELIB_NAME_AW(PSecPkgContext_CredentialName)
684 typedef struct _SecPkgContext_AccessToken
686 void *AccessToken;
687 } SecPkgContext_AccessToken, *PSecPkgContext_AccessToken;
689 typedef struct _SecPkgContext_TargetInformation
691 ULONG MarshalledTargetInfoLength;
692 unsigned char *MarshalledTargetInfo;
693 } SecPkgContext_TargetInformation, *PSecPkgContext_TargetInformation;
695 typedef struct _SecPkgContext_AuthzID
697 ULONG AuthzIDLength;
698 char *AuthzID;
699 } SecPkgContext_AuthzID, *PSecPkgContext_AuthzID;
701 typedef struct _SecPkgContext_Target
703 ULONG TargetLength;
704 char *Target;
705 } SecPkgContext_Target, *PSecPkgContext_Target;
707 typedef struct _SecPkgContext_Bindings
709 ULONG BindingsLength;
710 SEC_CHANNEL_BINDINGS *Bindings;
711 } SecPkgContext_Bindings, *PSecPkgContext_Bindings;
713 SECURITY_STATUS SEC_ENTRY ImpersonateSecurityContext(PCtxtHandle phContext);
715 typedef SECURITY_STATUS (SEC_ENTRY *IMPERSONATE_SECURITY_CONTEXT_FN)
716 (PCtxtHandle);
718 SECURITY_STATUS SEC_ENTRY RevertSecurityContext(PCtxtHandle phContext);
720 typedef SECURITY_STATUS (SEC_ENTRY *REVERT_SECURITY_CONTEXT_FN)(PCtxtHandle);
722 SECURITY_STATUS SEC_ENTRY MakeSignature(PCtxtHandle phContext,
723 ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo);
725 typedef SECURITY_STATUS (SEC_ENTRY *MAKE_SIGNATURE_FN)(PCtxtHandle,
726 ULONG, PSecBufferDesc, ULONG);
728 SECURITY_STATUS SEC_ENTRY VerifySignature(PCtxtHandle phContext,
729 PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP);
731 typedef SECURITY_STATUS (SEC_ENTRY *VERIFY_SIGNATURE_FN)(PCtxtHandle,
732 PSecBufferDesc, ULONG, PULONG);
734 SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoA(
735 SEC_CHAR *pszPackageName, PSecPkgInfoA *ppPackageInfo);
736 SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoW(
737 SEC_WCHAR *pszPackageName, PSecPkgInfoW *ppPackageInfo);
738 #define QuerySecurityPackageInfo WINELIB_NAME_AW(QuerySecurityPackageInfo)
740 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_PACKAGE_INFO_FN_A)
741 (SEC_CHAR *, PSecPkgInfoA *);
742 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_PACKAGE_INFO_FN_W)
743 (SEC_WCHAR *, PSecPkgInfoW *);
744 #define QUERY_SECURITY_PACKAGE_INFO_FN WINELIB_NAME_AW(QUERY_SECURITY_PACKAGE_INFO_FN_)
746 SECURITY_STATUS SEC_ENTRY ExportSecurityContext(PCtxtHandle phContext,
747 ULONG fFlags, PSecBuffer pPackedContext, void **pToken);
749 typedef SECURITY_STATUS (SEC_ENTRY *EXPORT_SECURITY_CONTEXT_FN)(PCtxtHandle,
750 ULONG, PSecBuffer, void **);
752 /* values for ExportSecurityContext fFlags */
753 #define SECPKG_CONTEXT_EXPORT_RESET_NEW 0x00000001
754 #define SECPKG_CONTEXT_EXPORT_DELETE_OLD 0x00000002
756 SECURITY_STATUS SEC_ENTRY ImportSecurityContextA(SEC_CHAR *pszPackage,
757 PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext);
758 SECURITY_STATUS SEC_ENTRY ImportSecurityContextW(SEC_WCHAR *pszPackage,
759 PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext);
760 #define ImportSecurityContext WINELIB_NAME_AW(ImportSecurityContext)
762 typedef SECURITY_STATUS (SEC_ENTRY *IMPORT_SECURITY_CONTEXT_FN_A)(SEC_CHAR *,
763 PSecBuffer, void *, PCtxtHandle);
764 typedef SECURITY_STATUS (SEC_ENTRY *IMPORT_SECURITY_CONTEXT_FN_W)(SEC_WCHAR *,
765 PSecBuffer, void *, PCtxtHandle);
766 #define IMPORT_SECURITY_CONTEXT_FN WINELIB_NAME_AW(IMPORT_SECURITY_CONTEXT_FN_)
768 SECURITY_STATUS SEC_ENTRY AddCredentialsA(PCredHandle hCredentials,
769 SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse,
770 void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
771 PTimeStamp ptsExpiry);
772 SECURITY_STATUS SEC_ENTRY AddCredentialsW(PCredHandle hCredentials,
773 SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse,
774 void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
775 PTimeStamp ptsExpiry);
776 #define AddCredentials WINELIB_NAME_AW(AddCredentials)
778 typedef SECURITY_STATUS (SEC_ENTRY *ADD_CREDENTIALS_FN_A)(PCredHandle,
779 SEC_CHAR *, SEC_CHAR *, ULONG, void *, SEC_GET_KEY_FN, void *,
780 PTimeStamp);
781 typedef SECURITY_STATUS (SEC_ENTRY *ADD_CREDENTIALS_FN_W)(PCredHandle,
782 SEC_WCHAR *, SEC_WCHAR *, ULONG, void *, SEC_GET_KEY_FN, void *,
783 PTimeStamp);
785 SECURITY_STATUS SEC_ENTRY QuerySecurityContextToken(PCtxtHandle phContext,
786 HANDLE *phToken);
788 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_CONTEXT_TOKEN_FN)
789 (PCtxtHandle, HANDLE *);
791 SECURITY_STATUS SEC_ENTRY EncryptMessage(PCtxtHandle phContext, ULONG fQOP,
792 PSecBufferDesc pMessage, ULONG MessageSeqNo);
793 SECURITY_STATUS SEC_ENTRY DecryptMessage(PCtxtHandle phContext,
794 PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP);
796 /* values for EncryptMessage fQOP */
797 #define SECQOP_WRAP_NO_ENCRYPT 0x80000001
799 typedef SECURITY_STATUS (SEC_ENTRY *ENCRYPT_MESSAGE_FN)(PCtxtHandle, ULONG,
800 PSecBufferDesc, ULONG);
801 typedef SECURITY_STATUS (SEC_ENTRY *DECRYPT_MESSAGE_FN)(PCtxtHandle,
802 PSecBufferDesc, ULONG, PULONG);
804 SECURITY_STATUS SEC_ENTRY SetContextAttributesA(PCtxtHandle phContext,
805 ULONG ulAttribute, void *pBuffer, ULONG cbBuffer);
806 SECURITY_STATUS SEC_ENTRY SetContextAttributesW(PCtxtHandle phContext,
807 ULONG ulAttribute, void *pBuffer, ULONG cbBuffer);
808 #define SetContextAttributes WINELIB_NAME_AW(SetContextAttributes)
810 typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,
811 ULONG, void *, ULONG);
812 typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
813 ULONG, void *, ULONG);
815 #define SECURITY_ENTRYPOINT_ANSIA "InitSecurityInterfaceA"
816 #define SECURITY_ENTRYPOINT_ANSIW "InitSecurityInterfaceW"
817 #define SECURITY_ENTRYPOINT_ANSI WINELIB_NAME_AW(SECURITY_ENTRYPOINT_ANSI)
819 typedef struct _SECURITY_FUNCTION_TABLE_A
821 ULONG dwVersion;
822 ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA;
823 QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA;
824 ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA;
825 FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
826 void *Reserved2;
827 INITIALIZE_SECURITY_CONTEXT_FN_A InitializeSecurityContextA;
828 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
829 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
830 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
831 APPLY_CONTROL_TOKEN_FN ApplyControlToken;
832 QUERY_CONTEXT_ATTRIBUTES_FN_A QueryContextAttributesA;
833 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
834 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
835 MAKE_SIGNATURE_FN MakeSignature;
836 VERIFY_SIGNATURE_FN VerifySignature;
837 FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
838 QUERY_SECURITY_PACKAGE_INFO_FN_A QuerySecurityPackageInfoA;
839 void *Reserved3;
840 void *Reserved4;
841 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
842 IMPORT_SECURITY_CONTEXT_FN_A ImportSecurityContextA;
843 ADD_CREDENTIALS_FN_A AddCredentialsA;
844 void *Reserved8;
845 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
846 ENCRYPT_MESSAGE_FN EncryptMessage;
847 DECRYPT_MESSAGE_FN DecryptMessage;
848 SET_CONTEXT_ATTRIBUTES_FN_A SetContextAttributesA;
849 } SecurityFunctionTableA, *PSecurityFunctionTableA;
851 typedef struct _SECURITY_FUNCTION_TABLE_W
853 ULONG dwVersion;
854 ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW;
855 QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW;
856 ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW;
857 FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
858 void *Reserved2;
859 INITIALIZE_SECURITY_CONTEXT_FN_W InitializeSecurityContextW;
860 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
861 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
862 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
863 APPLY_CONTROL_TOKEN_FN ApplyControlToken;
864 QUERY_CONTEXT_ATTRIBUTES_FN_W QueryContextAttributesW;
865 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
866 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
867 MAKE_SIGNATURE_FN MakeSignature;
868 VERIFY_SIGNATURE_FN VerifySignature;
869 FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
870 QUERY_SECURITY_PACKAGE_INFO_FN_W QuerySecurityPackageInfoW;
871 void *Reserved3;
872 void *Reserved4;
873 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
874 IMPORT_SECURITY_CONTEXT_FN_W ImportSecurityContextW;
875 ADD_CREDENTIALS_FN_W AddCredentialsW;
876 void *Reserved8;
877 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
878 ENCRYPT_MESSAGE_FN EncryptMessage;
879 DECRYPT_MESSAGE_FN DecryptMessage;
880 SET_CONTEXT_ATTRIBUTES_FN_W SetContextAttributesW;
881 } SecurityFunctionTableW, *PSecurityFunctionTableW;
883 #define SecurityFunctionTable WINELIB_NAME_AW(SecurityFunctionTable)
884 #define PSecurityFunctionTable WINELIB_NAME_AW(PSecurityFunctionTable)
886 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION 1
887 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 2
889 PSecurityFunctionTableA SEC_ENTRY InitSecurityInterfaceA(void);
890 PSecurityFunctionTableW SEC_ENTRY InitSecurityInterfaceW(void);
891 #define InitSecurityInterface WINELIB_NAME_AW(InitSecurityInterface)
893 typedef PSecurityFunctionTableA (SEC_ENTRY *INIT_SECURITY_INTERFACE_A)(void);
894 typedef PSecurityFunctionTableW (SEC_ENTRY *INIT_SECURITY_INTERFACE_W)(void);
895 #define INIT_SECURITY_INTERFACE WINELIB_NAME_AW(INIT_SECURITY_INTERFACE_)
897 #ifdef __cplusplus
899 #endif
901 #endif /* ndef __WINE_SSPI_H__ */