cmd: DIR command outputs free space for the path.
[wine.git] / include / sspi.h
blob6d7ea5a5ef26d2a9b1936ee7df65b55512288bd7
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 #if defined(_NTDEF_) || defined(_WINNT_)
73 typedef LARGE_INTEGER _SECURITY_INTEGER, SECURITY_INTEGER,*PSECURITY_INTEGER;
74 #else
75 typedef struct _SECURITY_INTEGER
77 ULONG LowPart;
78 LONG HighPart;
79 } SECURITY_INTEGER, *PSECURITY_INTEGER;
80 #endif
82 typedef SECURITY_INTEGER TimeStamp, *PTimeStamp;
84 #ifndef __UNICODE_STRING_DEFINED__
85 #define __UNICODE_STRING_DEFINED__
86 typedef struct _UNICODE_STRING {
87 USHORT Length; /* bytes */
88 USHORT MaximumLength; /* bytes */
89 PWSTR Buffer;
90 } UNICODE_STRING, *PUNICODE_STRING;
91 #endif
93 typedef UNICODE_STRING SECURITY_STRING, *PSECURITY_STRING;
95 #define SSPIPFC_CREDPROV_DO_NOT_SAVE 0x00000001
96 #define SSPIPFC_NO_CHECKBOX 0x00000002
98 typedef void *PSEC_WINNT_AUTH_IDENTITY_OPAQUE;
100 SECURITY_STATUS SEC_ENTRY SspiEncodeAuthIdentityAsStrings(
101 PSEC_WINNT_AUTH_IDENTITY_OPAQUE, PCWSTR *, PCWSTR *, PCWSTR *);
103 SECURITY_STATUS SEC_ENTRY SspiEncodeStringsAsAuthIdentity(
104 PCWSTR, PCWSTR, PCWSTR, PSEC_WINNT_AUTH_IDENTITY_OPAQUE *);
106 SECURITY_STATUS SEC_ENTRY SspiPrepareForCredWrite(
107 PSEC_WINNT_AUTH_IDENTITY_OPAQUE, PCWSTR, PULONG, PCWSTR*, PCWSTR*, PUCHAR*, PULONG);
109 ULONG SEC_ENTRY SspiPromptForCredentialsA(PCSTR, void *,
110 ULONG, PCSTR, PSEC_WINNT_AUTH_IDENTITY_OPAQUE,
111 PSEC_WINNT_AUTH_IDENTITY_OPAQUE *, int *, ULONG);
112 ULONG SEC_ENTRY SspiPromptForCredentialsW(PCWSTR, void *,
113 ULONG, PCWSTR, PSEC_WINNT_AUTH_IDENTITY_OPAQUE,
114 PSEC_WINNT_AUTH_IDENTITY_OPAQUE *, int *, ULONG);
115 #define SspiPromptForCredentials WINELIB_NAME_AW(SspiPromptForCredentials)
117 void SEC_ENTRY SspiFreeAuthIdentity(PSEC_WINNT_AUTH_IDENTITY_OPAQUE);
118 void SEC_ENTRY SspiLocalFree(void *);
119 void SEC_ENTRY SspiZeroAuthIdentity(PSEC_WINNT_AUTH_IDENTITY_OPAQUE);
121 typedef struct _SecPkgInfoA
123 ULONG fCapabilities;
124 USHORT wVersion;
125 USHORT wRPCID;
126 ULONG cbMaxToken;
127 SEC_CHAR *Name;
128 SEC_CHAR *Comment;
129 } SecPkgInfoA, *PSecPkgInfoA;
131 typedef struct _SecPkgInfoW
133 ULONG fCapabilities;
134 USHORT wVersion;
135 USHORT wRPCID;
136 ULONG cbMaxToken;
137 SEC_WCHAR *Name;
138 SEC_WCHAR *Comment;
139 } SecPkgInfoW, *PSecPkgInfoW;
141 typedef struct _SECURITY_PACKAGE_OPTIONS {
142 ULONG Size;
143 ULONG Type;
144 ULONG Flags;
145 ULONG SignatureSize;
146 void *Signature;
147 } SECURITY_PACKAGE_OPTIONS, *PSECURITY_PACKAGE_OPTIONS;
149 SECURITY_STATUS WINAPI AddSecurityPackageA(LPSTR,SECURITY_PACKAGE_OPTIONS*);
150 SECURITY_STATUS WINAPI AddSecurityPackageW(LPWSTR,SECURITY_PACKAGE_OPTIONS*);
151 #define AddSecurityPackage WINELIB_NAME_AW(AddSecurityPackage)
153 #define SecPkgInfo WINELIB_NAME_AW(SecPkgInfo)
154 #define PSecPkgInfo WINELIB_NAME_AW(PSecPkgInfo)
156 /* fCapabilities field of SecPkgInfo */
157 #define SECPKG_FLAG_INTEGRITY 0x00000001
158 #define SECPKG_FLAG_PRIVACY 0x00000002
159 #define SECPKG_FLAG_TOKEN_ONLY 0x00000004
160 #define SECPKG_FLAG_DATAGRAM 0x00000008
161 #define SECPKG_FLAG_CONNECTION 0x00000010
162 #define SECPKG_FLAG_MULTI_REQUIRED 0x00000020
163 #define SECPKG_FLAG_CLIENT_ONLY 0x00000040
164 #define SECPKG_FLAG_EXTENDED_ERROR 0x00000080
165 #define SECPKG_FLAG_IMPERSONATION 0x00000100
166 #define SECPKG_FLAG_ACCEPT_WIN32_NAME 0x00000200
167 #define SECPKG_FLAG_STREAM 0x00000400
168 #define SECPKG_FLAG_NEGOTIABLE 0x00000800
169 #define SECPKG_FLAG_GSS_COMPATIBLE 0x00001000
170 #define SECPKG_FLAG_LOGON 0x00002000
171 #define SECPKG_FLAG_ASCII_BUFFERS 0x00004000
172 #define SECPKG_FLAG_FRAGMENT 0x00008000
173 #define SECPKG_FLAG_MUTUAL_AUTH 0x00010000
174 #define SECPKG_FLAG_DELEGATION 0x00020000
175 #define SECPKG_FLAG_READONLY_WITH_CHECKSUM 0x00040000
176 #define SECPKG_FLAG_RESTRICTED_TOKENS 0x00080000
177 #define SECPKG_FLAG_NEGO_EXTENDER 0x00100000
178 #define SECPKG_FLAG_NEGOTIABLE2 0x00200000
179 #define SECPKG_FLAG_APPCONTAINER_PASSTHROUGH 0x00400000
180 #define SECPKG_FLAG_APPCONTAINER_CHECKS 0x00800000
181 #define SECPKG_FLAG_CREDENTIAL_ISOLATION_ENABLED 0x01000000
182 #define SECPKG_FLAG_APPLY_LOOPBACK 0x02000000
184 #define SECPKG_ID_NONE 0xffff
186 typedef struct _SecBuffer
188 ULONG cbBuffer;
189 ULONG BufferType;
190 PVOID pvBuffer;
191 } SecBuffer, *PSecBuffer;
193 /* values for BufferType */
194 #define SECBUFFER_EMPTY 0
195 #define SECBUFFER_DATA 1
196 #define SECBUFFER_TOKEN 2
197 #define SECBUFFER_PKG_PARAMS 3
198 #define SECBUFFER_MISSING 4
199 #define SECBUFFER_EXTRA 5
200 #define SECBUFFER_STREAM_TRAILER 6
201 #define SECBUFFER_STREAM_HEADER 7
202 #define SECBUFFER_NEGOTIATION_INFO 8
203 #define SECBUFFER_PADDING 9
204 #define SECBUFFER_STREAM 10
205 #define SECBUFFER_MECHLIST 11
206 #define SECBUFFER_MECHLIST_SIGNATURE 12
207 #define SECBUFFER_TARGET 13
208 #define SECBUFFER_CHANNEL_BINDINGS 14
209 #define SECBUFFER_ALERT 17
210 #define SECBUFFER_APPLICATION_PROTOCOLS 18
211 #define SECBUFFER_DTLS_MTU 24
213 #define SECBUFFER_ATTRMASK 0xf0000000
214 #define SECBUFFER_READONLY 0x80000000
215 #define SECBUFFER_READONLY_WITH_CHECKSUM 0x10000000
216 #define SECBUFFER_RESERVED 0x60000000
218 typedef struct _SecBufferDesc
220 ULONG ulVersion;
221 ULONG cBuffers;
222 PSecBuffer pBuffers;
223 } SecBufferDesc, *PSecBufferDesc;
225 /* values for ulVersion */
226 #define SECBUFFER_VERSION 0
228 typedef void (SEC_ENTRY *SEC_GET_KEY_FN)(void *Arg, void *Principal,
229 ULONG KeyVer, void **Key, SECURITY_STATUS *Status);
231 SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesA(PULONG pcPackages,
232 PSecPkgInfoA *ppPackageInfo);
233 SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesW(PULONG pcPackages,
234 PSecPkgInfoW *ppPackageInfo);
235 #define EnumerateSecurityPackages WINELIB_NAME_AW(EnumerateSecurityPackages)
237 typedef SECURITY_STATUS (SEC_ENTRY *ENUMERATE_SECURITY_PACKAGES_FN_A)(PULONG,
238 PSecPkgInfoA *);
239 typedef SECURITY_STATUS (SEC_ENTRY *ENUMERATE_SECURITY_PACKAGES_FN_W)(PULONG,
240 PSecPkgInfoW *);
241 #define ENUMERATE_SECURITY_PACKAGES_FN WINELIB_NAME_AW(ENUMERATE_SECURITY_PACKAGES_FN_)
243 SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesA(
244 PCredHandle phCredential, ULONG ulAttribute, void *pBuffer);
245 SECURITY_STATUS SEC_ENTRY QueryCredentialsAttributesW(
246 PCredHandle phCredential, ULONG ulAttribute, void *pBuffer);
247 #define QueryCredentialsAttributes WINELIB_NAME_AW(QueryCredentialsAttributes)
249 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CREDENTIALS_ATTRIBUTES_FN_A)
250 (PCredHandle, ULONG, PVOID);
251 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CREDENTIALS_ATTRIBUTES_FN_W)
252 (PCredHandle, ULONG, PVOID);
253 #define QUERY_CREDENTIALS_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CREDENTIALS_ATTRIBUTES_FN_)
255 typedef struct _SEC_CHANNEL_BINDINGS {
256 ULONG dwInitiatorAddrType;
257 ULONG cbInitiatorLength;
258 ULONG dwInitiatorOffset;
259 ULONG dwAcceptorAddrType;
260 ULONG cbAcceptorLength;
261 ULONG dwAcceptorOffset;
262 ULONG cbApplicationDataLength;
263 ULONG dwApplicationDataOffset;
264 } SEC_CHANNEL_BINDINGS, *PSEC_CHANNEL_BINDINGS;
266 /* values for QueryCredentialsAttributes ulAttribute */
267 #define SECPKG_CRED_ATTR_NAMES 1
269 /* types for QueryCredentialsAttributes */
270 typedef struct _SecPkgCredentials_NamesA
272 SEC_CHAR *sUserName;
273 } SecPkgCredentials_NamesA, *PSecPkgCredentials_NamesA;
275 typedef struct _SecPkgCredentials_NamesW
277 SEC_WCHAR *sUserName;
278 } SecPkgCredentials_NamesW, *PSecPkgCredentials_NamesW;
280 #define SecPkgCredentials_Names WINELIB_NAME_AW(SecPkgCredentials_Names)
282 SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleA(
283 SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse,
284 PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
285 PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry);
286 SECURITY_STATUS SEC_ENTRY AcquireCredentialsHandleW(
287 SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse,
288 PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
289 PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry);
290 #define AcquireCredentialsHandle WINELIB_NAME_AW(AcquireCredentialsHandle)
292 /* flags for fCredentialsUse */
293 #define SECPKG_CRED_INBOUND 0x00000001
294 #define SECPKG_CRED_OUTBOUND 0x00000002
295 #define SECPKG_CRED_BOTH (SECPKG_CRED_INBOUND | SECPKG_CRED_OUTBOUND)
296 #define SECPKG_CRED_DEFAULT 0x00000004
297 #define SECPKG_CRED_RESERVED 0xf0000000
299 typedef SECURITY_STATUS (SEC_ENTRY *ACQUIRE_CREDENTIALS_HANDLE_FN_A)(
300 SEC_CHAR *, SEC_CHAR *, ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID,
301 PCredHandle, PTimeStamp);
302 typedef SECURITY_STATUS (SEC_ENTRY *ACQUIRE_CREDENTIALS_HANDLE_FN_W)(
303 SEC_WCHAR *, SEC_WCHAR *, ULONG, PLUID, PVOID, SEC_GET_KEY_FN, PVOID,
304 PCredHandle, PTimeStamp);
305 #define ACQUIRE_CREDENTIALS_HANDLE_FN WINELIB_NAME_AW(ACQUIRE_CREDENTIALS_HANDLE_FN_)
307 SECURITY_STATUS SEC_ENTRY FreeContextBuffer(PVOID pv);
309 typedef SECURITY_STATUS (SEC_ENTRY *FREE_CONTEXT_BUFFER_FN)(PVOID);
311 SECURITY_STATUS SEC_ENTRY FreeCredentialsHandle(PCredHandle
312 phCredential);
314 #define FreeCredentialHandle FreeCredentialsHandle
316 typedef SECURITY_STATUS (SEC_ENTRY *FREE_CREDENTIALS_HANDLE_FN)(PCredHandle);
318 SECURITY_STATUS SEC_ENTRY InitializeSecurityContextA(
319 PCredHandle phCredential, PCtxtHandle phContext,
320 SEC_CHAR *pszTargetName, ULONG fContextReq,
321 ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
322 ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
323 ULONG *pfContextAttr, PTimeStamp ptsExpiry);
324 SECURITY_STATUS SEC_ENTRY InitializeSecurityContextW(
325 PCredHandle phCredential, PCtxtHandle phContext,
326 SEC_WCHAR *pszTargetName, ULONG fContextReq,
327 ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
328 ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
329 ULONG *pfContextAttr, PTimeStamp ptsExpiry);
330 #define InitializeSecurityContext WINELIB_NAME_AW(InitializeSecurityContext)
332 typedef SECURITY_STATUS (SEC_ENTRY *INITIALIZE_SECURITY_CONTEXT_FN_A)
333 (PCredHandle, PCtxtHandle, SEC_CHAR *, ULONG, ULONG, ULONG, PSecBufferDesc,
334 ULONG, PCtxtHandle, PSecBufferDesc, ULONG *, PTimeStamp);
335 typedef SECURITY_STATUS (SEC_ENTRY *INITIALIZE_SECURITY_CONTEXT_FN_W)
336 (PCredHandle, PCtxtHandle, SEC_WCHAR *, ULONG, ULONG, ULONG, PSecBufferDesc,
337 ULONG, PCtxtHandle, PSecBufferDesc, ULONG *, PTimeStamp);
338 #define INITIALIZE_SECURITY_CONTEXT_FN WINELIB_NAME_AW(INITIALIZE_SECURITY_CONTEXT_FN_)
340 /* flags for InitializeSecurityContext fContextReq and pfContextAttr */
341 #define ISC_REQ_DELEGATE 0x00000001
342 #define ISC_REQ_MUTUAL_AUTH 0x00000002
343 #define ISC_REQ_REPLAY_DETECT 0x00000004
344 #define ISC_REQ_SEQUENCE_DETECT 0x00000008
345 #define ISC_REQ_CONFIDENTIALITY 0x00000010
346 #define ISC_REQ_USE_SESSION_KEY 0x00000020
347 #define ISC_REQ_PROMPT_FOR_CREDS 0x00000040
348 #define ISC_REQ_USE_SUPPLIED_CREDS 0x00000080
349 #define ISC_REQ_ALLOCATE_MEMORY 0x00000100
350 #define ISC_REQ_USE_DCE_STYLE 0x00000200
351 #define ISC_REQ_DATAGRAM 0x00000400
352 #define ISC_REQ_CONNECTION 0x00000800
353 #define ISC_REQ_CALL_LEVEL 0x00001000
354 #define ISC_REQ_FRAGMENT_SUPPLIED 0x00002000
355 #define ISC_REQ_EXTENDED_ERROR 0x00004000
356 #define ISC_REQ_STREAM 0x00008000
357 #define ISC_REQ_INTEGRITY 0x00010000
358 #define ISC_REQ_IDENTIFY 0x00020000
359 #define ISC_REQ_NULL_SESSION 0x00040000
360 #define ISC_REQ_MANUAL_CRED_VALIDATION 0x00080000
361 #define ISC_REQ_RESERVED1 0x00100000
362 #define ISC_REQ_FRAGMENT_TO_FIT 0x00200000
364 #define ISC_RET_DELEGATE 0x00000001
365 #define ISC_RET_MUTUAL_AUTH 0x00000002
366 #define ISC_RET_REPLAY_DETECT 0x00000004
367 #define ISC_RET_SEQUENCE_DETECT 0x00000008
368 #define ISC_RET_CONFIDENTIALITY 0x00000010
369 #define ISC_RET_USE_SESSION_KEY 0x00000020
370 #define ISC_RET_USED_COLLECTED_CREDS 0x00000040
371 #define ISC_RET_USED_SUPPLIED_CREDS 0x00000080
372 #define ISC_RET_ALLOCATED_MEMORY 0x00000100
373 #define ISC_RET_USED_DCE_STYLE 0x00000200
374 #define ISC_RET_DATAGRAM 0x00000400
375 #define ISC_RET_CONNECTION 0x00000800
376 #define ISC_RET_INTERMEDIATE_RETURN 0x00001000
377 #define ISC_RET_CALL_LEVEL 0x00002000
378 #define ISC_RET_EXTENDED_ERROR 0x00004000
379 #define ISC_RET_STREAM 0x00008000
380 #define ISC_RET_INTEGRITY 0x00010000
381 #define ISC_RET_IDENTIFY 0x00020000
382 #define ISC_RET_NULL_SESSION 0x00040000
383 #define ISC_RET_MANUAL_CRED_VALIDATION 0x00080000
384 #define ISC_RET_RESERVED1 0x00100000
385 #define ISC_RET_FRAGMENT_ONLY 0x00200000
387 SECURITY_STATUS SEC_ENTRY AcceptSecurityContext(
388 PCredHandle phCredential, PCtxtHandle phContext, PSecBufferDesc pInput,
389 ULONG fContextReq, ULONG TargetDataRep,
390 PCtxtHandle phNewContext, PSecBufferDesc pOutput,
391 ULONG *pfContextAttr, PTimeStamp ptsExpiry);
393 typedef SECURITY_STATUS (SEC_ENTRY *ACCEPT_SECURITY_CONTEXT_FN)(PCredHandle,
394 PCtxtHandle, PSecBufferDesc, ULONG, ULONG, PCtxtHandle,
395 PSecBufferDesc, ULONG *, PTimeStamp);
397 /* flags for AcceptSecurityContext fContextReq and pfContextAttr */
398 #define ASC_REQ_DELEGATE 0x00000001
399 #define ASC_REQ_MUTUAL_AUTH 0x00000002
400 #define ASC_REQ_REPLAY_DETECT 0x00000004
401 #define ASC_REQ_SEQUENCE_DETECT 0x00000008
402 #define ASC_REQ_CONFIDENTIALITY 0x00000010
403 #define ASC_REQ_USE_SESSION_KEY 0x00000020
404 #define ASC_REQ_ALLOCATE_MEMORY 0x00000100
405 #define ASC_REQ_USE_DCE_STYLE 0x00000200
406 #define ASC_REQ_DATAGRAM 0x00000400
407 #define ASC_REQ_CONNECTION 0x00000800
408 #define ASC_REQ_CALL_LEVEL 0x00001000
409 #define ASC_REQ_FRAGMENT_SUPPLIED 0x00002000
410 #define ASC_REQ_EXTENDED_ERROR 0x00008000
411 #define ASC_REQ_STREAM 0x00010000
412 #define ASC_REQ_INTEGRITY 0x00020000
413 #define ASC_REQ_LICENSING 0x00040000
414 #define ASC_REQ_IDENTIFY 0x00080000
415 #define ASC_REQ_ALLOW_NULL_SESSION 0x00100000
416 #define ASC_REQ_ALLOW_NON_USER_LOGONS 0x00200000
417 #define ASC_REQ_ALLOW_CONTEXT_REPLAY 0x00400000
418 #define ASC_REQ_FRAGMENT_TO_FIT 0x00800000
419 #define ASC_REQ_FRAGMENT_NO_TOKEN 0x01000000
421 #define ASC_RET_DELEGATE 0x00000001
422 #define ASC_RET_MUTUAL_AUTH 0x00000002
423 #define ASC_RET_REPLAY_DETECT 0x00000004
424 #define ASC_RET_SEQUENCE_DETECT 0x00000008
425 #define ASC_RET_CONFIDENTIALITY 0x00000010
426 #define ASC_RET_USE_SESSION_KEY 0x00000020
427 #define ASC_RET_ALLOCATED_MEMORY 0x00000100
428 #define ASC_RET_USED_DCE_STYLE 0x00000200
429 #define ASC_RET_DATAGRAM 0x00000400
430 #define ASC_RET_CONNECTION 0x00000800
431 #define ASC_RET_CALL_LEVEL 0x00002000
432 #define ASC_RET_THIRD_LEG_FAILED 0x00004000
433 #define ASC_RET_EXTENDED_ERROR 0x00008000
434 #define ASC_RET_STREAM 0x00010000
435 #define ASC_RET_INTEGRITY 0x00020000
436 #define ASC_RET_LICENSING 0x00040000
437 #define ASC_RET_IDENTIFY 0x00080000
438 #define ASC_RET_NULL_SESSION 0x00100000
439 #define ASC_RET_ALLOW_NON_USER_LOGONS 0x00200000
440 #define ASC_RET_ALLOW_CONTEXT_REPLAY 0x00400000
441 #define ASC_RET_FRAGMENT_ONLY 0x00800000
442 #define ASC_RET_NO_TOKEN 0x01000000
444 /* values for TargetDataRep */
445 #define SECURITY_NATIVE_DREP 0x00000010
446 #define SECURITY_NETWORK_DREP 0x00000000
448 SECURITY_STATUS SEC_ENTRY CompleteAuthToken(PCtxtHandle phContext,
449 PSecBufferDesc pToken);
451 typedef SECURITY_STATUS (SEC_ENTRY *COMPLETE_AUTH_TOKEN_FN)(PCtxtHandle,
452 PSecBufferDesc);
454 SECURITY_STATUS SEC_ENTRY DeleteSecurityContext(PCtxtHandle phContext);
456 typedef SECURITY_STATUS (SEC_ENTRY *DELETE_SECURITY_CONTEXT_FN)(PCtxtHandle);
458 SECURITY_STATUS SEC_ENTRY ApplyControlToken(PCtxtHandle phContext,
459 PSecBufferDesc pInput);
461 typedef SECURITY_STATUS (SEC_ENTRY *APPLY_CONTROL_TOKEN_FN)(PCtxtHandle,
462 PSecBufferDesc);
464 SECURITY_STATUS SEC_ENTRY QueryContextAttributesA(PCtxtHandle phContext,
465 ULONG ulAttribute, void *pBuffer);
466 SECURITY_STATUS SEC_ENTRY QueryContextAttributesW(PCtxtHandle phContext,
467 ULONG ulAttribute, void *pBuffer);
468 #define QueryContextAttributes WINELIB_NAME_AW(QueryContextAttributes)
470 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,
471 ULONG, void *);
472 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
473 ULONG, void *);
474 #define QUERY_CONTEXT_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CONTEXT_ATTRIBUTES_FN_)
476 /* values for QueryContextAttributes/SetContextAttributes ulAttribute */
477 #define SECPKG_ATTR_SIZES 0
478 #define SECPKG_ATTR_NAMES 1
479 #define SECPKG_ATTR_LIFESPAN 2
480 #define SECPKG_ATTR_DCE_INFO 3
481 #define SECPKG_ATTR_STREAM_SIZES 4
482 #define SECPKG_ATTR_KEY_INFO 5
483 #define SECPKG_ATTR_AUTHORITY 6
484 #define SECPKG_ATTR_PROTO_INFO 7
485 #define SECPKG_ATTR_PASSWORD_EXPIRY 8
486 #define SECPKG_ATTR_SESSION_KEY 9
487 #define SECPKG_ATTR_PACKAGE_INFO 10
488 #define SECPKG_ATTR_USER_FLAGS 11
489 #define SECPKG_ATTR_NEGOTIATION_INFO 12
490 #define SECPKG_ATTR_NATIVE_NAMES 13
491 #define SECPKG_ATTR_FLAGS 14
492 #define SECPKG_ATTR_USE_VALIDATED 15
493 #define SECPKG_ATTR_CREDENTIAL_NAME 16
494 #define SECPKG_ATTR_TARGET_INFORMATION 17
495 #define SECPKG_ATTR_ACCESS_TOKEN 18
496 #define SECPKG_ATTR_TARGET 19
497 #define SECPKG_ATTR_AUTHENTICATION_ID 20
498 #define SECPKG_ATTR_LOGOFF_TIME 21
499 #define SECPKG_ATTR_NEGO_KEYS 22
500 #define SECPKG_ATTR_PROMPTING_NEEDED 24
501 #define SECPKG_ATTR_UNIQUE_BINDINGS 25
502 #define SECPKG_ATTR_ENDPOINT_BINDINGS 26
503 #define SECPKG_ATTR_CLIENT_SPECIFIED_TARGET 27
504 #define SECPKG_ATTR_LAST_CLIENT_TOKEN_STATUS 30
505 #define SECPKG_ATTR_NEGO_PKG_INFO 31
506 #define SECPKG_ATTR_NEGO_STATUS 32
507 #define SECPKG_ATTR_CONTEXT_DELETED 33
508 #define SECPKG_ATTR_APPLICATION_PROTOCOL 35
510 #define SECPKG_ATTR_SUBJECT_SECURITY_ATTRIBUTES 128
511 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_KERBEROS 0x1
512 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_NTLM 0x2
514 /* types for QueryContextAttributes/SetContextAttributes */
516 typedef struct _SecPkgContext_Sizes
518 ULONG cbMaxToken;
519 ULONG cbMaxSignature;
520 ULONG cbBlockSize;
521 ULONG cbSecurityTrailer;
522 } SecPkgContext_Sizes, *PSecPkgContext_Sizes;
524 typedef struct _SecPkgContext_StreamSizes
526 ULONG cbHeader;
527 ULONG cbTrailer;
528 ULONG cbMaximumMessage;
529 ULONG cBuffers;
530 ULONG cbBlockSize;
531 } SecPkgContext_StreamSizes, *PSecPkgContext_StreamSizes;
533 typedef struct _SecPkgContext_NamesA
535 SEC_CHAR *sUserName;
536 } SecPkgContext_NamesA, *PSecPkgContext_NamesA;
538 typedef struct _SecPkgContext_NamesW
540 SEC_WCHAR *sUserName;
541 } SecPkgContext_NamesW, *PSecPkgContext_NamesW;
543 #define SecPkgContext_Names WINELIB_NAME_AW(SecPkgContext_Names)
544 #define PSecPkgContext_Names WINELIB_NAME_AW(PSecPkgContext_Names)
546 typedef struct _SecPkgContext_Lifespan
548 TimeStamp tsStart;
549 TimeStamp tsExpiry;
550 } SecPkgContext_Lifespan, *PSecPkgContext_Lifespan;
552 typedef struct _SecPkgContext_DceInfo
554 ULONG AuthzSvc;
555 PVOID pPac;
556 } SecPkgContext_DceInfo, *PSecPkgContext_DceInfo;
558 typedef struct _SecPkgContext_KeyInfoA
560 SEC_CHAR *sSignatureAlgorithmName;
561 SEC_CHAR *sEncryptAlgorithmName;
562 ULONG KeySize;
563 ULONG SignatureAlgorithm;
564 ULONG EncryptAlgorithm;
565 } SecPkgContext_KeyInfoA, *PSecPkgContext_KeyInfoA;
567 typedef struct _SecPkgContext_KeyInfoW
569 SEC_WCHAR *sSignatureAlgorithmName;
570 SEC_WCHAR *sEncryptAlgorithmName;
571 ULONG KeySize;
572 ULONG SignatureAlgorithm;
573 ULONG EncryptAlgorithm;
574 } SecPkgContext_KeyInfoW, *PSecPkgContext_KeyInfoW;
576 #define SecPkgContext_KeyInfo WINELIB_NAME_AW(SecPkgContext_KeyInfo)
577 #define PSecPkgContext_KeyInfo WINELIB_NAME_AW(PSecPkgContext_KeyInfo)
579 typedef struct _SecPkgContext_AuthorityA
581 SEC_CHAR *sAuthorityName;
582 } SecPkgContext_AuthorityA, *PSecPkgContext_AuthorityA;
584 typedef struct _SecPkgContext_AuthorityW
586 SEC_WCHAR *sAuthorityName;
587 } SecPkgContext_AuthorityW, *PSecPkgContext_AuthorityW;
589 #define SecPkgContext_Authority WINELIB_NAME_AW(SecPkgContext_Authority)
590 #define PSecPkgContext_Authority WINELIB_NAME_AW(PSecPkgContext_Authority)
592 typedef struct _SecPkgContext_ProtoInfoA
594 SEC_CHAR *sProtocolName;
595 ULONG majorVersion;
596 ULONG minorVersion;
597 } SecPkgContext_ProtoInfoA, *PSecPkgContext_ProtoInfoA;
599 typedef struct _SecPkgContext_ProtoInfoW
601 SEC_WCHAR *sProtocolName;
602 ULONG majorVersion;
603 ULONG minorVersion;
604 } SecPkgContext_ProtoInfoW, *PSecPkgContext_ProtoInfoW;
606 #define SecPkgContext_ProtoInfo WINELIB_NAME_AW(SecPkgContext_ProtoInfo)
607 #define PSecPkgContext_ProtoInfo WINELIB_NAME_AW(PSecPkgContext_ProtoInfo)
609 typedef struct _SecPkgContext_PasswordExpiry
611 TimeStamp tsPasswordExpires;
612 } SecPkgContext_PasswordExpiry, *PSecPkgContext_PasswordExpiry;
614 typedef struct _SecPkgContext_SessionKey
616 ULONG SessionKeyLength;
617 unsigned char *SessionKey;
618 } SecPkgContext_SessionKey, *PSecPkgContext_SessionKey;
620 typedef struct _SecPkgContext_PackageInfoA
622 PSecPkgInfoA PackageInfo;
623 } SecPkgContext_PackageInfoA, *PSecPkgContext_PackageInfoA;
625 typedef struct _SecPkgContext_PackageInfoW
627 PSecPkgInfoW PackageInfo;
628 } SecPkgContext_PackageInfoW, *PSecPkgContext_PackageInfoW;
630 #define SecPkgContext_PackageInfo WINELIB_NAME_AW(SecPkgContext_PackageInfo)
631 #define PSecPkgContext_PackageInfo WINELIB_NAME_AW(PSecPkgContext_PackageInfo)
633 typedef struct _SecPkgContext_Flags
635 ULONG Flags;
636 } SecPkgContext_Flags, *PSecPkgContext_Flags;
638 typedef struct _SecPkgContext_UserFlags
640 ULONG UserFlags;
641 } SecPkgContext_UserFlags, *PSecPkgContext_UserFlags;
643 typedef struct _SecPkgContext_NegotiationInfoA
645 PSecPkgInfoA PackageInfo;
646 ULONG NegotiationState;
647 } SecPkgContext_NegotiationInfoA, *PSecPkgContext_NegotiationInfoA;
649 typedef struct _SecPkgContext_NegotiationInfoW
651 PSecPkgInfoW PackageInfo;
652 ULONG NegotiationState;
653 } SecPkgContext_NegotiationInfoW, *PSecPkgContext_NegotiationInfoW;
655 #define SecPkgContext_NegotiationInfo WINELIB_NAME_AW(SecPkgContext_NegotiationInfo)
656 #define PSecPkgContext_NegotiationInfo WINELIB_NAME_AW(PSecPkgContext_NegotiationInfo)
658 /* values for NegotiationState */
659 #define SECPKG_NEGOTIATION_COMPLETE 0
660 #define SECPKG_NEGOTIATION_OPTIMISTIC 1
661 #define SECPKG_NEGOTIATION_IN_PROGRESS 2
662 #define SECPKG_NEGOTIATION_DIRECT 3
663 #define SECPKG_NEGOTIATION_TRY_MULTICRED 4
665 typedef struct _SecPkgContext_NativeNamesA
667 SEC_CHAR *sClientName;
668 SEC_CHAR *sServerName;
669 } SecPkgContext_NativeNamesA, *PSecPkgContext_NativeNamesA;
671 typedef struct _SecPkgContext_NativeNamesW
673 SEC_WCHAR *sClientName;
674 SEC_WCHAR *sServerName;
675 } SecPkgContext_NativeNamesW, *PSecPkgContext_NativeNamesW;
677 #define SecPkgContext_NativeNames WINELIB_NAME_AW(SecPkgContext_NativeNames)
678 #define PSecPkgContext_NativeNames WINELIB_NAME_AW(PSecPkgContext_NativeNames)
680 typedef struct _SecPkgContext_CredentialNameA
682 ULONG CredentialType;
683 SEC_CHAR *sCredentialName;
684 } SecPkgContext_CredentialNameA, *PSecPkgContext_CredentialNameA;
686 typedef struct _SecPkgContext_CredentialNameW
688 ULONG CredentialType;
689 SEC_WCHAR *sCredentialName;
690 } SecPkgContext_CredentialNameW, *PSecPkgContext_CredentialNameW;
692 #define SecPkgContext_CredentialName WINELIB_NAME_AW(SecPkgContext_CredentialName)
693 #define PSecPkgContext_CredentialName WINELIB_NAME_AW(PSecPkgContext_CredentialName)
695 typedef struct _SecPkgContext_AccessToken
697 void *AccessToken;
698 } SecPkgContext_AccessToken, *PSecPkgContext_AccessToken;
700 typedef struct _SecPkgContext_TargetInformation
702 ULONG MarshalledTargetInfoLength;
703 unsigned char *MarshalledTargetInfo;
704 } SecPkgContext_TargetInformation, *PSecPkgContext_TargetInformation;
706 typedef struct _SecPkgContext_AuthzID
708 ULONG AuthzIDLength;
709 char *AuthzID;
710 } SecPkgContext_AuthzID, *PSecPkgContext_AuthzID;
712 typedef struct _SecPkgContext_Target
714 ULONG TargetLength;
715 char *Target;
716 } SecPkgContext_Target, *PSecPkgContext_Target;
718 typedef struct _SecPkgContext_Bindings
720 ULONG BindingsLength;
721 SEC_CHANNEL_BINDINGS *Bindings;
722 } SecPkgContext_Bindings, *PSecPkgContext_Bindings;
724 typedef enum _SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS
726 SecApplicationProtocolNegotiationStatus_None,
727 SecApplicationProtocolNegotiationStatus_Success,
728 SecApplicationProtocolNegotiationStatus_SelectedClientOnly
729 } SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS, *PSEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS;
731 typedef enum _SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT
733 SecApplicationProtocolNegotiationExt_None,
734 SecApplicationProtocolNegotiationExt_NPN,
735 SecApplicationProtocolNegotiationExt_ALPN
736 } SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT, *PSEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT;
738 #define MAX_PROTOCOL_ID_SIZE 0xff
740 typedef struct _SecPkgContext_ApplicationProtocol
742 SEC_APPLICATION_PROTOCOL_NEGOTIATION_STATUS ProtoNegoStatus;
743 SEC_APPLICATION_PROTOCOL_NEGOTIATION_EXT ProtoNegoExt;
744 unsigned char ProtocolIdSize;
745 unsigned char ProtocolId[MAX_PROTOCOL_ID_SIZE];
746 } SecPkgContext_ApplicationProtocol, *PSecPkgContext_ApplicationProtocol;
748 SECURITY_STATUS SEC_ENTRY ImpersonateSecurityContext(PCtxtHandle phContext);
750 typedef SECURITY_STATUS (SEC_ENTRY *IMPERSONATE_SECURITY_CONTEXT_FN)
751 (PCtxtHandle);
753 SECURITY_STATUS SEC_ENTRY RevertSecurityContext(PCtxtHandle phContext);
755 typedef SECURITY_STATUS (SEC_ENTRY *REVERT_SECURITY_CONTEXT_FN)(PCtxtHandle);
757 SECURITY_STATUS SEC_ENTRY MakeSignature(PCtxtHandle phContext,
758 ULONG fQOP, PSecBufferDesc pMessage, ULONG MessageSeqNo);
760 typedef SECURITY_STATUS (SEC_ENTRY *MAKE_SIGNATURE_FN)(PCtxtHandle,
761 ULONG, PSecBufferDesc, ULONG);
763 SECURITY_STATUS SEC_ENTRY VerifySignature(PCtxtHandle phContext,
764 PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP);
766 typedef SECURITY_STATUS (SEC_ENTRY *VERIFY_SIGNATURE_FN)(PCtxtHandle,
767 PSecBufferDesc, ULONG, PULONG);
769 SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoA(
770 SEC_CHAR *pszPackageName, PSecPkgInfoA *ppPackageInfo);
771 SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoW(
772 SEC_WCHAR *pszPackageName, PSecPkgInfoW *ppPackageInfo);
773 #define QuerySecurityPackageInfo WINELIB_NAME_AW(QuerySecurityPackageInfo)
775 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_PACKAGE_INFO_FN_A)
776 (SEC_CHAR *, PSecPkgInfoA *);
777 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_PACKAGE_INFO_FN_W)
778 (SEC_WCHAR *, PSecPkgInfoW *);
779 #define QUERY_SECURITY_PACKAGE_INFO_FN WINELIB_NAME_AW(QUERY_SECURITY_PACKAGE_INFO_FN_)
781 SECURITY_STATUS SEC_ENTRY ExportSecurityContext(PCtxtHandle phContext,
782 ULONG fFlags, PSecBuffer pPackedContext, void **pToken);
784 typedef SECURITY_STATUS (SEC_ENTRY *EXPORT_SECURITY_CONTEXT_FN)(PCtxtHandle,
785 ULONG, PSecBuffer, void **);
787 /* values for ExportSecurityContext fFlags */
788 #define SECPKG_CONTEXT_EXPORT_RESET_NEW 0x00000001
789 #define SECPKG_CONTEXT_EXPORT_DELETE_OLD 0x00000002
791 SECURITY_STATUS SEC_ENTRY ImportSecurityContextA(SEC_CHAR *pszPackage,
792 PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext);
793 SECURITY_STATUS SEC_ENTRY ImportSecurityContextW(SEC_WCHAR *pszPackage,
794 PSecBuffer pPackedContext, void *Token, PCtxtHandle phContext);
795 #define ImportSecurityContext WINELIB_NAME_AW(ImportSecurityContext)
797 typedef SECURITY_STATUS (SEC_ENTRY *IMPORT_SECURITY_CONTEXT_FN_A)(SEC_CHAR *,
798 PSecBuffer, void *, PCtxtHandle);
799 typedef SECURITY_STATUS (SEC_ENTRY *IMPORT_SECURITY_CONTEXT_FN_W)(SEC_WCHAR *,
800 PSecBuffer, void *, PCtxtHandle);
801 #define IMPORT_SECURITY_CONTEXT_FN WINELIB_NAME_AW(IMPORT_SECURITY_CONTEXT_FN_)
803 SECURITY_STATUS SEC_ENTRY AddCredentialsA(PCredHandle hCredentials,
804 SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse,
805 void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
806 PTimeStamp ptsExpiry);
807 SECURITY_STATUS SEC_ENTRY AddCredentialsW(PCredHandle hCredentials,
808 SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse,
809 void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
810 PTimeStamp ptsExpiry);
811 #define AddCredentials WINELIB_NAME_AW(AddCredentials)
813 typedef SECURITY_STATUS (SEC_ENTRY *ADD_CREDENTIALS_FN_A)(PCredHandle,
814 SEC_CHAR *, SEC_CHAR *, ULONG, void *, SEC_GET_KEY_FN, void *,
815 PTimeStamp);
816 typedef SECURITY_STATUS (SEC_ENTRY *ADD_CREDENTIALS_FN_W)(PCredHandle,
817 SEC_WCHAR *, SEC_WCHAR *, ULONG, void *, SEC_GET_KEY_FN, void *,
818 PTimeStamp);
820 SECURITY_STATUS SEC_ENTRY QuerySecurityContextToken(PCtxtHandle phContext,
821 HANDLE *phToken);
823 typedef SECURITY_STATUS (SEC_ENTRY *QUERY_SECURITY_CONTEXT_TOKEN_FN)
824 (PCtxtHandle, HANDLE *);
826 SECURITY_STATUS SEC_ENTRY EncryptMessage(PCtxtHandle phContext, ULONG fQOP,
827 PSecBufferDesc pMessage, ULONG MessageSeqNo);
828 SECURITY_STATUS SEC_ENTRY DecryptMessage(PCtxtHandle phContext,
829 PSecBufferDesc pMessage, ULONG MessageSeqNo, PULONG pfQOP);
831 /* values for EncryptMessage fQOP */
832 #define SECQOP_WRAP_NO_ENCRYPT 0x80000001
834 typedef SECURITY_STATUS (SEC_ENTRY *ENCRYPT_MESSAGE_FN)(PCtxtHandle, ULONG,
835 PSecBufferDesc, ULONG);
836 typedef SECURITY_STATUS (SEC_ENTRY *DECRYPT_MESSAGE_FN)(PCtxtHandle,
837 PSecBufferDesc, ULONG, PULONG);
839 SECURITY_STATUS SEC_ENTRY SetContextAttributesA(PCtxtHandle phContext,
840 ULONG ulAttribute, void *pBuffer, ULONG cbBuffer);
841 SECURITY_STATUS SEC_ENTRY SetContextAttributesW(PCtxtHandle phContext,
842 ULONG ulAttribute, void *pBuffer, ULONG cbBuffer);
843 #define SetContextAttributes WINELIB_NAME_AW(SetContextAttributes)
845 typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,
846 ULONG, void *, ULONG);
847 typedef SECURITY_STATUS (SEC_ENTRY *SET_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,
848 ULONG, void *, ULONG);
850 #define SECURITY_ENTRYPOINT_ANSIA "InitSecurityInterfaceA"
851 #define SECURITY_ENTRYPOINT_ANSIW "InitSecurityInterfaceW"
852 #define SECURITY_ENTRYPOINT_ANSI WINELIB_NAME_AW(SECURITY_ENTRYPOINT_ANSI)
854 typedef struct _SECURITY_FUNCTION_TABLE_A
856 ULONG dwVersion;
857 ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA;
858 QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA;
859 ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA;
860 FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
861 void *Reserved2;
862 INITIALIZE_SECURITY_CONTEXT_FN_A InitializeSecurityContextA;
863 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
864 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
865 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
866 APPLY_CONTROL_TOKEN_FN ApplyControlToken;
867 QUERY_CONTEXT_ATTRIBUTES_FN_A QueryContextAttributesA;
868 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
869 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
870 MAKE_SIGNATURE_FN MakeSignature;
871 VERIFY_SIGNATURE_FN VerifySignature;
872 FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
873 QUERY_SECURITY_PACKAGE_INFO_FN_A QuerySecurityPackageInfoA;
874 void *Reserved3;
875 void *Reserved4;
876 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
877 IMPORT_SECURITY_CONTEXT_FN_A ImportSecurityContextA;
878 ADD_CREDENTIALS_FN_A AddCredentialsA;
879 void *Reserved8;
880 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
881 ENCRYPT_MESSAGE_FN EncryptMessage;
882 DECRYPT_MESSAGE_FN DecryptMessage;
883 SET_CONTEXT_ATTRIBUTES_FN_A SetContextAttributesA;
884 } SecurityFunctionTableA, *PSecurityFunctionTableA;
886 typedef struct _SECURITY_FUNCTION_TABLE_W
888 ULONG dwVersion;
889 ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW;
890 QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW;
891 ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW;
892 FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle;
893 void *Reserved2;
894 INITIALIZE_SECURITY_CONTEXT_FN_W InitializeSecurityContextW;
895 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext;
896 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken;
897 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext;
898 APPLY_CONTROL_TOKEN_FN ApplyControlToken;
899 QUERY_CONTEXT_ATTRIBUTES_FN_W QueryContextAttributesW;
900 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext;
901 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext;
902 MAKE_SIGNATURE_FN MakeSignature;
903 VERIFY_SIGNATURE_FN VerifySignature;
904 FREE_CONTEXT_BUFFER_FN FreeContextBuffer;
905 QUERY_SECURITY_PACKAGE_INFO_FN_W QuerySecurityPackageInfoW;
906 void *Reserved3;
907 void *Reserved4;
908 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext;
909 IMPORT_SECURITY_CONTEXT_FN_W ImportSecurityContextW;
910 ADD_CREDENTIALS_FN_W AddCredentialsW;
911 void *Reserved8;
912 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken;
913 ENCRYPT_MESSAGE_FN EncryptMessage;
914 DECRYPT_MESSAGE_FN DecryptMessage;
915 SET_CONTEXT_ATTRIBUTES_FN_W SetContextAttributesW;
916 } SecurityFunctionTableW, *PSecurityFunctionTableW;
918 #define SecurityFunctionTable WINELIB_NAME_AW(SecurityFunctionTable)
919 #define PSecurityFunctionTable WINELIB_NAME_AW(PSecurityFunctionTable)
921 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION 1
922 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 2
924 PSecurityFunctionTableA SEC_ENTRY InitSecurityInterfaceA(void);
925 PSecurityFunctionTableW SEC_ENTRY InitSecurityInterfaceW(void);
926 #define InitSecurityInterface WINELIB_NAME_AW(InitSecurityInterface)
928 typedef PSecurityFunctionTableA (SEC_ENTRY *INIT_SECURITY_INTERFACE_A)(void);
929 typedef PSecurityFunctionTableW (SEC_ENTRY *INIT_SECURITY_INTERFACE_W)(void);
930 #define INIT_SECURITY_INTERFACE WINELIB_NAME_AW(INIT_SECURITY_INTERFACE_)
932 #ifdef __cplusplus
934 #endif
936 #endif /* ndef __WINE_SSPI_H__ */