ntdll: Reimplement DbgPrint* using DBG_PRINTEXCEPTION_C.
[wine.git] / include / sspi.h
blobe7371f129de4145ca8ddd416a8001b755655a0b2
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
176 #define SECPKG_FLAG_CREDENTIAL_ISOLATION_ENABLED 0x01000000
177 #define SECPKG_FLAG_APPLY_LOOPBACK 0x02000000
179 #define SECPKG_ID_NONE 0xffff
181 typedef struct _SecBuffer
183 ULONG cbBuffer;
184 ULONG BufferType;
185 PVOID pvBuffer;
186 } SecBuffer, *PSecBuffer;
188 /* values for BufferType */
189 #define SECBUFFER_EMPTY 0
190 #define SECBUFFER_DATA 1
191 #define SECBUFFER_TOKEN 2
192 #define SECBUFFER_PKG_PARAMS 3
193 #define SECBUFFER_MISSING 4
194 #define SECBUFFER_EXTRA 5
195 #define SECBUFFER_STREAM_TRAILER 6
196 #define SECBUFFER_STREAM_HEADER 7
197 #define SECBUFFER_NEGOTIATION_INFO 8
198 #define SECBUFFER_PADDING 9
199 #define SECBUFFER_STREAM 10
200 #define SECBUFFER_MECHLIST 11
201 #define SECBUFFER_MECHLIST_SIGNATURE 12
202 #define SECBUFFER_TARGET 13
203 #define SECBUFFER_CHANNEL_BINDINGS 14
204 #define SECBUFFER_APPLICATION_PROTOCOLS 18
206 #define SECBUFFER_ATTRMASK 0xf0000000
207 #define SECBUFFER_READONLY 0x80000000
208 #define SECBUFFER_READONLY_WITH_CHECKSUM 0x10000000
209 #define SECBUFFER_RESERVED 0x60000000
211 typedef struct _SecBufferDesc
213 ULONG ulVersion;
214 ULONG cBuffers;
215 PSecBuffer pBuffers;
216 } SecBufferDesc, *PSecBufferDesc;
218 /* values for ulVersion */
219 #define SECBUFFER_VERSION 0
221 typedef void (SEC_ENTRY *SEC_GET_KEY_FN)(void *Arg, void *Principal,
222 ULONG KeyVer, void **Key, SECURITY_STATUS *Status);
224 SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesA(PULONG pcPackages,
225 PSecPkgInfoA *ppPackageInfo);
226 SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesW(PULONG pcPackages,
227 PSecPkgInfoW *ppPackageInfo);
228 #define EnumerateSecurityPackages WINELIB_NAME_AW(EnumerateSecurityPackages)
230 typedef SECURITY_STATUS (SEC_ENTRY *ENUMERATE_SECURITY_PACKAGES_FN_A)(PULONG,
231 PSecPkgInfoA *);
232 typedef SECURITY_STATUS (SEC_ENTRY *ENUMERATE_SECURITY_PACKAGES_FN_W)(PULONG,
233 PSecPkgInfoW *);
234 #define ENUMERATE_SECURITY_PACKAGES_FN WINELIB_NAME_AW(ENUMERATE_SECURITY_PACKAGES_FN_)
236 SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesA(
237 PCredHandle phCredential, ULONG ulAttribute, void *pBuffer);
238 SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesW(
239 PCredHandle phCredential, ULONG ulAttribute, void *pBuffer);
240 #define QueryCredentialsAttributes WINELIB_NAME_AW(QueryCredentialsAttributes)
242 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CREDENTIALS_ATTRIBUTES_FN_A)
243 (PCredHandle, ULONG, PVOID);
244 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CREDENTIALS_ATTRIBUTES_FN_W)
245 (PCredHandle, ULONG, PVOID);
246 #define QUERY_CREDENTIALS_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CREDENTIALS_ATTRIBUTES_FN_)
248 typedef struct _SEC_CHANNEL_BINDINGS {
249 ULONG dwInitiatorAddrType;
250 ULONG cbInitiatorLength;
251 ULONG dwInitiatorOffset;
252 ULONG dwAcceptorAddrType;
253 ULONG cbAcceptorLength;
254 ULONG dwAcceptorOffset;
255 ULONG cbApplicationDataLength;
256 ULONG dwApplicationDataOffset;
257 } SEC_CHANNEL_BINDINGS, *PSEC_CHANNEL_BINDINGS;
259 /* values for QueryCredentialsAttributes ulAttribute */
260 #define SECPKG_CRED_ATTR_NAMES 1
262 /* types for QueryCredentialsAttributes */
263 typedef struct _SecPkgCredentials_NamesA
265 SEC_CHAR *sUserName;
266 } SecPkgCredentials_NamesA, *PSecPkgCredentials_NamesA;
268 typedef struct _SecPkgCredentials_NamesW
270 SEC_WCHAR *sUserName;
271 } SecPkgCredentials_NamesW, *PSecPkgCredentials_NamesW;
273 #define SecPkgCredentials_Names WINELIB_NAME_AW(SecPkgCredentials_Names)
275 SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleA(
276 SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse,
277 PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
278 PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry);
279 SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleW(
280 SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse,
281 PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
282 PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry);
283 #define AcquireCredentialsHandle WINELIB_NAME_AW(AcquireCredentialsHandle)
285 /* flags for fCredentialsUse */
286 #define SECPKG_CRED_INBOUND 0x00000001
287 #define SECPKG_CRED_OUTBOUND 0x00000002
288 #define SECPKG_CRED_BOTH (SECPKG_CRED_INBOUND | SECPKG_CRED_OUTBOUND)
289 #define SECPKG_CRED_DEFAULT 0x00000004
290 #define SECPKG_CRED_RESERVED 0xf0000000
292 typedef SECURITY_STATUS (SEC_ENTRY *ACQUIRE_CREDENTIALS_HANDLE_FN_A)(
293 SEC_CHAR *, SEC_CHAR *, ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID,
294 PCredHandle, PTimeStamp);
295 typedef SECURITY_STATUS (SEC_ENTRY *ACQUIRE_CREDENTIALS_HANDLE_FN_W)(
296 SEC_WCHAR *, SEC_WCHAR *, ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID,
297 PCredHandle, PTimeStamp);
298 #define ACQUIRE_CREDENTIALS_HANDLE_FN WINELIB_NAME_AW(ACQUIRE_CREDENTIALS_HANDLE_FN_)
300 SECURITY_STATUS SEC_ENTRY FreeContextBuffer(PVOID pv);
302 typedef SECURITY_STATUS (SEC_ENTRY *FREE_CONTEXT_BUFFER_FN)(PVOID);
304 SECURITY_STATUS SEC_ENTRY FreeCredentialsHandle(PCredHandle
305 phCredential);
307 #define FreeCredentialHandle FreeCredentialsHandle
309 typedef SECURITY_STATUS (SEC_ENTRY *FREE_CREDENTIALS_HANDLE_FN)(PCredHandle);
311 SECURITY_STATUS SEC_ENTRY InitializeSecurityContextA(
312 PCredHandle phCredential, PCtxtHandle phContext,
313 SEC_CHAR *pszTargetName, ULONG fContextReq,
314 ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
315 ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
316 ULONG *pfContextAttr, PTimeStamp ptsExpiry);
317 SECURITY_STATUS SEC_ENTRY InitializeSecurityContextW(
318 PCredHandle phCredential, PCtxtHandle phContext,
319 SEC_WCHAR *pszTargetName, ULONG fContextReq,
320 ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
321 ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
322 ULONG *pfContextAttr, PTimeStamp ptsExpiry);
323 #define InitializeSecurityContext WINELIB_NAME_AW(InitializeSecurityContext)
325 typedef SECURITY_STATUS (SEC_ENTRY *INITIALIZE_SECURITY_CONTEXT_FN_A)
326 (PCredHandle, PCtxtHandle, SEC_CHAR *, ULONG, ULONG, ULONG, PSecBufferDesc,
327 ULONG, PCtxtHandle, PSecBufferDesc, ULONG *, PTimeStamp);
328 typedef SECURITY_STATUS (SEC_ENTRY *INITIALIZE_SECURITY_CONTEXT_FN_W)
329 (PCredHandle, PCtxtHandle, SEC_WCHAR *, ULONG, ULONG, ULONG, PSecBufferDesc,
330 ULONG, PCtxtHandle, PSecBufferDesc, ULONG *, PTimeStamp);
331 #define INITIALIZE_SECURITY_CONTEXT_FN WINELIB_NAME_AW(INITIALIZE_SECURITY_CONTEXT_FN_)
333 /* flags for InitializeSecurityContext fContextReq and pfContextAttr */
334 #define ISC_REQ_DELEGATE 0x00000001
335 #define ISC_REQ_MUTUAL_AUTH 0x00000002
336 #define ISC_REQ_REPLAY_DETECT 0x00000004
337 #define ISC_REQ_SEQUENCE_DETECT 0x00000008
338 #define ISC_REQ_CONFIDENTIALITY 0x00000010
339 #define ISC_REQ_USE_SESSION_KEY 0x00000020
340 #define ISC_REQ_PROMPT_FOR_CREDS 0x00000040
341 #define ISC_REQ_USE_SUPPLIED_CREDS 0x00000080
342 #define ISC_REQ_ALLOCATE_MEMORY 0x00000100
343 #define ISC_REQ_USE_DCE_STYLE 0x00000200
344 #define ISC_REQ_DATAGRAM 0x00000400
345 #define ISC_REQ_CONNECTION 0x00000800
346 #define ISC_REQ_CALL_LEVEL 0x00001000
347 #define ISC_REQ_FRAGMENT_SUPPLIED 0x00002000
348 #define ISC_REQ_EXTENDED_ERROR 0x00004000
349 #define ISC_REQ_STREAM 0x00008000
350 #define ISC_REQ_INTEGRITY 0x00010000
351 #define ISC_REQ_IDENTIFY 0x00020000
352 #define ISC_REQ_NULL_SESSION 0x00040000
353 #define ISC_REQ_MANUAL_CRED_VALIDATION 0x00080000
354 #define ISC_REQ_RESERVED1 0x00100000
355 #define ISC_REQ_FRAGMENT_TO_FIT 0x00200000
357 #define ISC_RET_DELEGATE 0x00000001
358 #define ISC_RET_MUTUAL_AUTH 0x00000002
359 #define ISC_RET_REPLAY_DETECT 0x00000004
360 #define ISC_RET_SEQUENCE_DETECT 0x00000008
361 #define ISC_RET_CONFIDENTIALITY 0x00000010
362 #define ISC_RET_USE_SESSION_KEY 0x00000020
363 #define ISC_RET_USED_COLLECTED_CREDS 0x00000040
364 #define ISC_RET_USED_SUPPLIED_CREDS 0x00000080
365 #define ISC_RET_ALLOCATED_MEMORY 0x00000100
366 #define ISC_RET_USED_DCE_STYLE 0x00000200
367 #define ISC_RET_DATAGRAM 0x00000400
368 #define ISC_RET_CONNECTION 0x00000800
369 #define ISC_RET_INTERMEDIATE_RETURN 0x00001000
370 #define ISC_RET_CALL_LEVEL 0x00002000
371 #define ISC_RET_EXTENDED_ERROR 0x00004000
372 #define ISC_RET_STREAM 0x00008000
373 #define ISC_RET_INTEGRITY 0x00010000
374 #define ISC_RET_IDENTIFY 0x00020000
375 #define ISC_RET_NULL_SESSION 0x00040000
376 #define ISC_RET_MANUAL_CRED_VALIDATION 0x00080000
377 #define ISC_RET_RESERVED1 0x00100000
378 #define ISC_RET_FRAGMENT_ONLY 0x00200000
380 SECURITY_STATUS SEC_ENTRY AcceptSecurityContext(
381 PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput,
382 ULONG fContextReq, ULONG TargetDataRep,
383 PCtxtHandle phNewContext, PSecBufferDesc pOutput,
384 ULONG *pfContextAttr, PTimeStamp ptsExpiry);
386 typedef SECURITY_STATUS (SEC_ENTRY *ACCEPT_SECURITY_CONTEXT_FN)(PCredHandle,
387 PCtxtHandle, PSecBufferDesc, ULONG, ULONG, PCtxtHandle,
388 PSecBufferDesc, ULONG *, PTimeStamp);
390 /* flags for AcceptSecurityContext fContextReq and pfContextAttr */
391 #define ASC_REQ_DELEGATE 0x00000001
392 #define ASC_REQ_MUTUAL_AUTH 0x00000002
393 #define ASC_REQ_REPLAY_DETECT 0x00000004
394 #define ASC_REQ_SEQUENCE_DETECT 0x00000008
395 #define ASC_REQ_CONFIDENTIALITY 0x00000010
396 #define ASC_REQ_USE_SESSION_KEY 0x00000020
397 #define ASC_REQ_ALLOCATE_MEMORY 0x00000100
398 #define ASC_REQ_USE_DCE_STYLE 0x00000200
399 #define ASC_REQ_DATAGRAM 0x00000400
400 #define ASC_REQ_CONNECTION 0x00000800
401 #define ASC_REQ_CALL_LEVEL 0x00001000
402 #define ASC_REQ_FRAGMENT_SUPPLIED 0x00002000
403 #define ASC_REQ_EXTENDED_ERROR 0x00008000
404 #define ASC_REQ_STREAM 0x00010000
405 #define ASC_REQ_INTEGRITY 0x00020000
406 #define ASC_REQ_LICENSING 0x00040000
407 #define ASC_REQ_IDENTIFY 0x00080000
408 #define ASC_REQ_ALLOW_NULL_SESSION 0x00100000
409 #define ASC_REQ_ALLOW_NON_USER_LOGONS 0x00200000
410 #define ASC_REQ_ALLOW_CONTEXT_REPLAY 0x00400000
411 #define ASC_REQ_FRAGMENT_TO_FIT 0x00800000
412 #define ASC_REQ_FRAGMENT_NO_TOKEN 0x01000000
414 #define ASC_RET_DELEGATE 0x00000001
415 #define ASC_RET_MUTUAL_AUTH 0x00000002
416 #define ASC_RET_REPLAY_DETECT 0x00000004
417 #define ASC_RET_SEQUENCE_DETECT 0x00000008
418 #define ASC_RET_CONFIDENTIALITY 0x00000010
419 #define ASC_RET_USE_SESSION_KEY 0x00000020
420 #define ASC_RET_ALLOCATED_MEMORY 0x00000100
421 #define ASC_RET_USED_DCE_STYLE 0x00000200
422 #define ASC_RET_DATAGRAM 0x00000400
423 #define ASC_RET_CONNECTION 0x00000800
424 #define ASC_RET_CALL_LEVEL 0x00002000
425 #define ASC_RET_THIRD_LEG_FAILED 0x00004000
426 #define ASC_RET_EXTENDED_ERROR 0x00008000
427 #define ASC_RET_STREAM 0x00010000
428 #define ASC_RET_INTEGRITY 0x00020000
429 #define ASC_RET_LICENSING 0x00040000
430 #define ASC_RET_IDENTIFY 0x00080000
431 #define ASC_RET_NULL_SESSION 0x00100000
432 #define ASC_RET_ALLOW_NON_USER_LOGONS 0x00200000
433 #define ASC_RET_ALLOW_CONTEXT_REPLAY 0x00400000
434 #define ASC_RET_FRAGMENT_ONLY 0x00800000
435 #define ASC_RET_NO_TOKEN 0x01000000
437 /* values for TargetDataRep */
438 #define SECURITY_NATIVE_DREP 0x00000010
439 #define SECURITY_NETWORK_DREP 0x00000000
441 SECURITY_STATUS SEC_ENTRY CompleteAuthToken(PCtxtHandle phContext,
442 PSecBufferDesc pToken);
444 typedef SECURITY_STATUS (SEC_ENTRY *COMPLETE_AUTH_TOKEN_FN)(PCtxtHandle,
445 PSecBufferDesc);
447 SECURITY_STATUS SEC_ENTRY DeleteSecurityContext(PCtxtHandle phContext);
449 typedef SECURITY_STATUS (SEC_ENTRY *DELETE_SECURITY_CONTEXT_FN)(PCtxtHandle);
451 SECURITY_STATUS SEC_ENTRY ApplyControlToken(PCtxtHandle phContext,
452 PSecBufferDesc pInput);
454 typedef SECURITY_STATUS (SEC_ENTRY *APPLY_CONTROL_TOKEN_FN)(PCtxtHandle,
455 PSecBufferDesc);
457 SECURITY_STATUS SEC_ENTRY QueryContextAttributesA(PCtxtHandle phContext,
458 ULONG ulAttribute, void *pBuffer);
459 SECURITY_STATUS SEC_ENTRY QueryContextAttributesW(PCtxtHandle phContext,
460 ULONG ulAttribute, void *pBuffer);
461 #define QueryContextAttributes WINELIB_NAME_AW(QueryContextAttributes)
463 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,
464 ULONG, void *);
465 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
466 ULONG, void *);
467 #define QUERY_CONTEXT_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CONTEXT_ATTRIBUTES_FN_)
469 /* values for QueryContextAttributes/SetContextAttributes ulAttribute */
470 #define SECPKG_ATTR_SIZES 0
471 #define SECPKG_ATTR_NAMES 1
472 #define SECPKG_ATTR_LIFESPAN 2
473 #define SECPKG_ATTR_DCE_INFO 3
474 #define SECPKG_ATTR_STREAM_SIZES 4
475 #define SECPKG_ATTR_KEY_INFO 5
476 #define SECPKG_ATTR_AUTHORITY 6
477 #define SECPKG_ATTR_PROTO_INFO 7
478 #define SECPKG_ATTR_PASSWORD_EXPIRY 8
479 #define SECPKG_ATTR_SESSION_KEY 9
480 #define SECPKG_ATTR_PACKAGE_INFO 10
481 #define SECPKG_ATTR_USER_FLAGS 11
482 #define SECPKG_ATTR_NEGOTIATION_INFO 12
483 #define SECPKG_ATTR_NATIVE_NAMES 13
484 #define SECPKG_ATTR_FLAGS 14
485 #define SECPKG_ATTR_USE_VALIDATED 15
486 #define SECPKG_ATTR_CREDENTIAL_NAME 16
487 #define SECPKG_ATTR_TARGET_INFORMATION 17
488 #define SECPKG_ATTR_ACCESS_TOKEN 18
489 #define SECPKG_ATTR_TARGET 19
490 #define SECPKG_ATTR_AUTHENTICATION_ID 20
491 #define SECPKG_ATTR_LOGOFF_TIME 21
492 #define SECPKG_ATTR_NEGO_KEYS 22
493 #define SECPKG_ATTR_PROMPTING_NEEDED 24
494 #define SECPKG_ATTR_UNIQUE_BINDINGS 25
495 #define SECPKG_ATTR_ENDPOINT_BINDINGS 26
496 #define SECPKG_ATTR_CLIENT_SPECIFIED_TARGET 27
497 #define SECPKG_ATTR_LAST_CLIENT_TOKEN_STATUS 30
498 #define SECPKG_ATTR_NEGO_PKG_INFO 31
499 #define SECPKG_ATTR_NEGO_STATUS 32
500 #define SECPKG_ATTR_CONTEXT_DELETED 33
501 #define SECPKG_ATTR_APPLICATION_PROTOCOL 35
503 #define SECPKG_ATTR_SUBJECT_SECURITY_ATTRIBUTES 128
504 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_KERBEROS 0x1
505 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_NTLM 0x2
507 /* types for QueryContextAttributes/SetContextAttributes */
509 typedef struct _SecPkgContext_Sizes
511 ULONG cbMaxToken;
512 ULONG cbMaxSignature;
513 ULONG cbBlockSize;
514 ULONG cbSecurityTrailer;
515 } SecPkgContext_Sizes, *PSecPkgContext_Sizes;
517 typedef struct _SecPkgContext_StreamSizes
519 ULONG cbHeader;
520 ULONG cbTrailer;
521 ULONG cbMaximumMessage;
522 ULONG cbBuffers;
523 ULONG cbBlockSize;
524 } SecPkgContext_StreamSizes, *PSecPkgContext_StreamSizes;
526 typedef struct _SecPkgContext_NamesA
528 SEC_CHAR *sUserName;
529 } SecPkgContext_NamesA, *PSecPkgContext_NamesA;
531 typedef struct _SecPkgContext_NamesW
533 SEC_WCHAR *sUserName;
534 } SecPkgContext_NamesW, *PSecPkgContext_NamesW;
536 #define SecPkgContext_Names WINELIB_NAME_AW(SecPkgContext_Names)
537 #define PSecPkgContext_Names WINELIB_NAME_AW(PSecPkgContext_Names)
539 typedef struct _SecPkgContext_Lifespan
541 TimeStamp tsStart;
542 TimeStamp tsExpiry;
543 } SecPkgContext_Lifespan, *PSecPkgContext_Lifespan;
545 typedef struct _SecPkgContext_DceInfo
547 ULONG AuthzSvc;
548 PVOID pPac;
549 } SecPkgContext_DceInfo, *PSecPkgContext_DceInfo;
551 typedef struct _SecPkgContext_KeyInfoA
553 SEC_CHAR *sSignatureAlgorithmName;
554 SEC_CHAR *sEncryptAlgorithmName;
555 ULONG KeySize;
556 ULONG SignatureAlgorithm;
557 ULONG EncryptAlgorithm;
558 } SecPkgContext_KeyInfoA, *PSecPkgContext_KeyInfoA;
560 typedef struct _SecPkgContext_KeyInfoW
562 SEC_WCHAR *sSignatureAlgorithmName;
563 SEC_WCHAR *sEncryptAlgorithmName;
564 ULONG KeySize;
565 ULONG SignatureAlgorithm;
566 ULONG EncryptAlgorithm;
567 } SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW;
569 #define SecPkgContext_KeyInfo WINELIB_NAME_AW(SecPkgContext_KeyInfo)
570 #define PSecPkgContext_KeyInfo WINELIB_NAME_AW(PSecPkgContext_KeyInfo)
572 typedef struct _SecPkgContext_AuthorityA
574 SEC_CHAR *sAuthorityName;
575 } SecPkgContext_AuthorityA, *PSecPkgContext_AuthorityA;
577 typedef struct _SecPkgContext_AuthorityW
579 SEC_WCHAR *sAuthorityName;
580 } SecPkgContext_AuthorityW, *PSecPkgContext_AuthorityW;
582 #define SecPkgContext_Authority WINELIB_NAME_AW(SecPkgContext_Authority)
583 #define PSecPkgContext_Authority WINELIB_NAME_AW(PSecPkgContext_Authority)
585 typedef struct _SecPkgContext_ProtoInfoA
587 SEC_CHAR *sProtocolName;
588 ULONG majorVersion;
589 ULONG minorVersion;
590 } SecPkgContext_ProtoInfoA, *PSecPkgContext_ProtoInfoA;
592 typedef struct _SecPkgContext_ProtoInfoW
594 SEC_WCHAR *sProtocolName;
595 ULONG majorVersion;
596 ULONG minorVersion;
597 } SecPkgContext_ProtoInfoW, *PSecPkgContext_ProtoInfoW;
599 #define SecPkgContext_ProtoInfo WINELIB_NAME_AW(SecPkgContext_ProtoInfo)
600 #define PSecPkgContext_ProtoInfo WINELIB_NAME_AW(PSecPkgContext_ProtoInfo)
602 typedef struct _SecPkgContext_PasswordExpiry
604 TimeStamp tsPasswordExpires;
605 } SecPkgContext_PasswordExpiry, *PSecPkgContext_PasswordExpiry;
607 typedef struct _SecPkgContext_SessionKey
609 ULONG SessionKeyLength;
610 unsigned char *SessionKey;
611 } SecPkgContext_SessionKey, *PSecPkgContext_SessionKey;
613 typedef struct _SecPkgContext_PackageInfoA
615 PSecPkgInfoA PackageInfo;
616 } SecPkgContext_PackageInfoA, *PSecPkgContext_PackageInfoA;
618 typedef struct _SecPkgContext_PackageInfoW
620 PSecPkgInfoW PackageInfo;
621 } SecPkgContext_PackageInfoW, *PSecPkgContext_PackageInfoW;
623 #define SecPkgContext_PackageInfo WINELIB_NAME_AW(SecPkgContext_PackageInfo)
624 #define PSecPkgContext_PackageInfo WINELIB_NAME_AW(PSecPkgContext_PackageInfo)
626 typedef struct _SecPkgContext_Flags
628 ULONG Flags;
629 } SecPkgContext_Flags, *PSecPkgContext_Flags;
631 typedef struct _SecPkgContext_UserFlags
633 ULONG UserFlags;
634 } SecPkgContext_UserFlags, *PSecPkgContext_UserFlags;
636 typedef struct _SecPkgContext_NegotiationInfoA
638 PSecPkgInfoA PackageInfo;
639 ULONG NegotiationState;
640 } SecPkgContext_NegotiationInfoA, *PSecPkgContext_NegotiationInfoA;
642 typedef struct _SecPkgContext_NegotiationInfoW
644 PSecPkgInfoW PackageInfo;
645 ULONG NegotiationState;
646 } SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW;
648 #define SecPkgContext_NegotiationInfo WINELIB_NAME_AW(SecPkgContext_NegotiationInfo)
649 #define PSecPkgContext_NegotiationInfo WINELIB_NAME_AW(PSecPkgContext_NegotiationInfo)
651 /* values for NegotiationState */
652 #define SECPKG_NEGOTIATION_COMPLETE 0
653 #define SECPKG_NEGOTIATION_OPTIMISTIC 1
654 #define SECPKG_NEGOTIATION_IN_PROGRESS 2
655 #define SECPKG_NEGOTIATION_DIRECT 3
656 #define SECPKG_NEGOTIATION_TRY_MULTICRED 4
658 typedef struct _SecPkgContext_NativeNamesA
660 SEC_CHAR *sClientName;
661 SEC_CHAR *sServerName;
662 } SecPkgContext_NativeNamesA, *PSecPkgContext_NativeNamesA;
664 typedef struct _SecPkgContext_NativeNamesW
666 SEC_WCHAR *sClientName;
667 SEC_WCHAR *sServerName;
668 } SecPkgContext_NativeNamesW, *PSecPkgContext_NativeNamesW;
670 #define SecPkgContext_NativeNames WINELIB_NAME_AW(SecPkgContext_NativeNames)
671 #define PSecPkgContext_NativeNames WINELIB_NAME_AW(PSecPkgContext_NativeNames)
673 typedef struct _SecPkgContext_CredentialNameA
675 ULONG CredentialType;
676 SEC_CHAR *sCredentialName;
677 } SecPkgContext_CredentialNameA, *PSecPkgContext_CredentialNameA;
679 typedef struct _SecPkgContext_CredentialNameW
681 ULONG CredentialType;
682 SEC_WCHAR *sCredentialName;
683 } SecPkgContext_CredentialNameW, *PSecPkgContext_CredentialNameW;
685 #define SecPkgContext_CredentialName WINELIB_NAME_AW(SecPkgContext_CredentialName)
686 #define PSecPkgContext_CredentialName WINELIB_NAME_AW(PSecPkgContext_CredentialName)
688 typedef struct _SecPkgContext_AccessToken
690 void *AccessToken;
691 } SecPkgContext_AccessToken, *PSecPkgContext_AccessToken;
693 typedef struct _SecPkgContext_TargetInformation
695 ULONG MarshalledTargetInfoLength;
696 unsigned char *MarshalledTargetInfo;
697 } SecPkgContext_TargetInformation, *PSecPkgContext_TargetInformation;
699 typedef struct _SecPkgContext_AuthzID
701 ULONG AuthzIDLength;
702 char *AuthzID;
703 } SecPkgContext_AuthzID, *PSecPkgContext_AuthzID;
705 typedef struct _SecPkgContext_Target
707 ULONG TargetLength;
708 char *Target;
709 } SecPkgContext_Target, *PSecPkgContext_Target;
711 typedef struct _SecPkgContext_Bindings
713 ULONG BindingsLength;
714 SEC_CHANNEL_BINDINGS *Bindings;
715 } SecPkgContext_Bindings, *PSecPkgContext_Bindings;
717 typedef enum _SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS
719 SecApplicationProtocolNegotiationStatus_None,
720 SecApplicationProtocolNegotiationStatus_Success,
721 SecApplicationProtocolNegotiationStatus_SelectedClientOnly
722 } SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS, *PSEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS;
724 typedef enum _SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT
726 SecApplicationProtocolNegotiationExt_None,
727 SecApplicationProtocolNegotiationExt_NPN,
728 SecApplicationProtocolNegotiationExt_ALPN
729 } SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT, *PSEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT;
731 #define MAX_PROTOCOL_ID_SIZE 0xff
733 typedef struct _SecPkgContext_ApplicationProtocol
735 SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS ProtoNegoStatus;
736 SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT ProtoNegoExt;
737 unsigned char ProtocolIdSize;
738 unsigned char ProtocolId[MAX_PROTOCOL_ID_SIZE];
739 } SecPkgContext_ApplicationProtocol, *PSecPkgContext_ApplicationProtocol;
741 SECURITY_STATUS SEC_ENTRY ImpersonateSecurityContext(PCtxtHandle phContext);
743 typedef SECURITY_STATUS (SEC_ENTRY *IMPERSONATE_SECURITY_CONTEXT_FN)
744 (PCtxtHandle);
746 SECURITY_STATUS SEC_ENTRY RevertSecurityContext(PCtxtHandle phContext);
748 typedef SECURITY_STATUS (SEC_ENTRY *REVERT_SECURITY_CONTEXT_FN)(PCtxtHandle);
750 SECURITY_STATUS SEC_ENTRY MakeSignature(PCtxtHandle phContext,
751 ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo);
753 typedef SECURITY_STATUS (SEC_ENTRY *MAKE_SIGNATURE_FN)(PCtxtHandle,
754 ULONG, PSecBufferDesc, ULONG);
756 SECURITY_STATUS SEC_ENTRY VerifySignature(PCtxtHandle phContext,
757 PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP);
759 typedef SECURITY_STATUS (SEC_ENTRY *VERIFY_SIGNATURE_FN)(PCtxtHandle,
760 PSecBufferDesc, ULONG, PULONG);
762 SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoA(
763 SEC_CHAR *pszPackageName, PSecPkgInfoA *ppPackageInfo);
764 SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoW(
765 SEC_WCHAR *pszPackageName, PSecPkgInfoW *ppPackageInfo);
766 #define QuerySecurityPackageInfo WINELIB_NAME_AW(QuerySecurityPackageInfo)
768 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_PACKAGE_INFO_FN_A)
769 (SEC_CHAR *, PSecPkgInfoA *);
770 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_PACKAGE_INFO_FN_W)
771 (SEC_WCHAR *, PSecPkgInfoW *);
772 #define QUERY_SECURITY_PACKAGE_INFO_FN WINELIB_NAME_AW(QUERY_SECURITY_PACKAGE_INFO_FN_)
774 SECURITY_STATUS SEC_ENTRY ExportSecurityContext(PCtxtHandle phContext,
775 ULONG fFlags, PSecBuffer pPackedContext, void **pToken);
777 typedef SECURITY_STATUS (SEC_ENTRY *EXPORT_SECURITY_CONTEXT_FN)(PCtxtHandle,
778 ULONG, PSecBuffer, void **);
780 /* values for ExportSecurityContext fFlags */
781 #define SECPKG_CONTEXT_EXPORT_RESET_NEW 0x00000001
782 #define SECPKG_CONTEXT_EXPORT_DELETE_OLD 0x00000002
784 SECURITY_STATUS SEC_ENTRY ImportSecurityContextA(SEC_CHAR *pszPackage,
785 PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext);
786 SECURITY_STATUS SEC_ENTRY ImportSecurityContextW(SEC_WCHAR *pszPackage,
787 PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext);
788 #define ImportSecurityContext WINELIB_NAME_AW(ImportSecurityContext)
790 typedef SECURITY_STATUS (SEC_ENTRY *IMPORT_SECURITY_CONTEXT_FN_A)(SEC_CHAR *,
791 PSecBuffer, void *, PCtxtHandle);
792 typedef SECURITY_STATUS (SEC_ENTRY *IMPORT_SECURITY_CONTEXT_FN_W)(SEC_WCHAR *,
793 PSecBuffer, void *, PCtxtHandle);
794 #define IMPORT_SECURITY_CONTEXT_FN WINELIB_NAME_AW(IMPORT_SECURITY_CONTEXT_FN_)
796 SECURITY_STATUS SEC_ENTRY AddCredentialsA(PCredHandle hCredentials,
797 SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse,
798 void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
799 PTimeStamp ptsExpiry);
800 SECURITY_STATUS SEC_ENTRY AddCredentialsW(PCredHandle hCredentials,
801 SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse,
802 void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
803 PTimeStamp ptsExpiry);
804 #define AddCredentials WINELIB_NAME_AW(AddCredentials)
806 typedef SECURITY_STATUS (SEC_ENTRY *ADD_CREDENTIALS_FN_A)(PCredHandle,
807 SEC_CHAR *, SEC_CHAR *, ULONG, void *, SEC_GET_KEY_FN, void *,
808 PTimeStamp);
809 typedef SECURITY_STATUS (SEC_ENTRY *ADD_CREDENTIALS_FN_W)(PCredHandle,
810 SEC_WCHAR *, SEC_WCHAR *, ULONG, void *, SEC_GET_KEY_FN, void *,
811 PTimeStamp);
813 SECURITY_STATUS SEC_ENTRY QuerySecurityContextToken(PCtxtHandle phContext,
814 HANDLE *phToken);
816 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_CONTEXT_TOKEN_FN)
817 (PCtxtHandle, HANDLE *);
819 SECURITY_STATUS SEC_ENTRY EncryptMessage(PCtxtHandle phContext, ULONG fQOP,
820 PSecBufferDesc pMessage, ULONG MessageSeqNo);
821 SECURITY_STATUS SEC_ENTRY DecryptMessage(PCtxtHandle phContext,
822 PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP);
824 /* values for EncryptMessage fQOP */
825 #define SECQOP_WRAP_NO_ENCRYPT 0x80000001
827 typedef SECURITY_STATUS (SEC_ENTRY *ENCRYPT_MESSAGE_FN)(PCtxtHandle, ULONG,
828 PSecBufferDesc, ULONG);
829 typedef SECURITY_STATUS (SEC_ENTRY *DECRYPT_MESSAGE_FN)(PCtxtHandle,
830 PSecBufferDesc, ULONG, PULONG);
832 SECURITY_STATUS SEC_ENTRY SetContextAttributesA(PCtxtHandle phContext,
833 ULONG ulAttribute, void *pBuffer, ULONG cbBuffer);
834 SECURITY_STATUS SEC_ENTRY SetContextAttributesW(PCtxtHandle phContext,
835 ULONG ulAttribute, void *pBuffer, ULONG cbBuffer);
836 #define SetContextAttributes WINELIB_NAME_AW(SetContextAttributes)
838 typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,
839 ULONG, void *, ULONG);
840 typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
841 ULONG, void *, ULONG);
843 #define SECURITY_ENTRYPOINT_ANSIA "InitSecurityInterfaceA"
844 #define SECURITY_ENTRYPOINT_ANSIW "InitSecurityInterfaceW"
845 #define SECURITY_ENTRYPOINT_ANSI WINELIB_NAME_AW(SECURITY_ENTRYPOINT_ANSI)
847 typedef struct _SECURITY_FUNCTION_TABLE_A
849 ULONG dwVersion;
850 ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA;
851 QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA;
852 ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA;
853 FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
854 void *Reserved2;
855 INITIALIZE_SECURITY_CONTEXT_FN_A InitializeSecurityContextA;
856 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
857 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
858 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
859 APPLY_CONTROL_TOKEN_FN ApplyControlToken;
860 QUERY_CONTEXT_ATTRIBUTES_FN_A QueryContextAttributesA;
861 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
862 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
863 MAKE_SIGNATURE_FN MakeSignature;
864 VERIFY_SIGNATURE_FN VerifySignature;
865 FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
866 QUERY_SECURITY_PACKAGE_INFO_FN_A QuerySecurityPackageInfoA;
867 void *Reserved3;
868 void *Reserved4;
869 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
870 IMPORT_SECURITY_CONTEXT_FN_A ImportSecurityContextA;
871 ADD_CREDENTIALS_FN_A AddCredentialsA;
872 void *Reserved8;
873 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
874 ENCRYPT_MESSAGE_FN EncryptMessage;
875 DECRYPT_MESSAGE_FN DecryptMessage;
876 SET_CONTEXT_ATTRIBUTES_FN_A SetContextAttributesA;
877 } SecurityFunctionTableA, *PSecurityFunctionTableA;
879 typedef struct _SECURITY_FUNCTION_TABLE_W
881 ULONG dwVersion;
882 ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW;
883 QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW;
884 ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW;
885 FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
886 void *Reserved2;
887 INITIALIZE_SECURITY_CONTEXT_FN_W InitializeSecurityContextW;
888 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
889 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
890 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
891 APPLY_CONTROL_TOKEN_FN ApplyControlToken;
892 QUERY_CONTEXT_ATTRIBUTES_FN_W QueryContextAttributesW;
893 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
894 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
895 MAKE_SIGNATURE_FN MakeSignature;
896 VERIFY_SIGNATURE_FN VerifySignature;
897 FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
898 QUERY_SECURITY_PACKAGE_INFO_FN_W QuerySecurityPackageInfoW;
899 void *Reserved3;
900 void *Reserved4;
901 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
902 IMPORT_SECURITY_CONTEXT_FN_W ImportSecurityContextW;
903 ADD_CREDENTIALS_FN_W AddCredentialsW;
904 void *Reserved8;
905 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
906 ENCRYPT_MESSAGE_FN EncryptMessage;
907 DECRYPT_MESSAGE_FN DecryptMessage;
908 SET_CONTEXT_ATTRIBUTES_FN_W SetContextAttributesW;
909 } SecurityFunctionTableW, *PSecurityFunctionTableW;
911 #define SecurityFunctionTable WINELIB_NAME_AW(SecurityFunctionTable)
912 #define PSecurityFunctionTable WINELIB_NAME_AW(PSecurityFunctionTable)
914 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION 1
915 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 2
917 PSecurityFunctionTableA SEC_ENTRY InitSecurityInterfaceA(void);
918 PSecurityFunctionTableW SEC_ENTRY InitSecurityInterfaceW(void);
919 #define InitSecurityInterface WINELIB_NAME_AW(InitSecurityInterface)
921 typedef PSecurityFunctionTableA (SEC_ENTRY *INIT_SECURITY_INTERFACE_A)(void);
922 typedef PSecurityFunctionTableW (SEC_ENTRY *INIT_SECURITY_INTERFACE_W)(void);
923 #define INIT_SECURITY_INTERFACE WINELIB_NAME_AW(INIT_SECURITY_INTERFACE_)
925 #ifdef __cplusplus
927 #endif
929 #endif /* ndef __WINE_SSPI_H__ */