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> */
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
;
38 typedef SEC_WCHAR
* SECURITY_PSTR
;
39 typedef const SEC_WCHAR
* SECURITY_PCSTR
;
41 typedef SEC_CHAR
* SECURITY_PSTR
;
42 typedef const SEC_CHAR
* SECURITY_PCSTR
;
45 #ifndef __SECHANDLE_DEFINED__
46 #define __SECHANDLE_DEFINED__
47 typedef struct _SecHandle
51 } SecHandle
, *PSecHandle
;
54 #define SecInvalidateHandle(x) do { \
55 ((PSecHandle)(x))->dwLower = ((ULONG_PTR)((INT_PTR)-1)); \
56 ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR)-1)); \
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
;
72 typedef struct _SECURITY_INTEGER
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 */
85 } UNICODE_STRING
, *PUNICODE_STRING
;
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
124 } SecPkgInfoA
, *PSecPkgInfoA
;
126 typedef struct _SecPkgInfoW
134 } SecPkgInfoW
, *PSecPkgInfoW
;
136 typedef struct _SECURITY_PACKAGE_OPTIONS
{
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
178 #define SECPKG_ID_NONE 0xffff
180 typedef struct _SecBuffer
185 } SecBuffer
, *PSecBuffer
;
187 /* values for BufferType */
188 #define SECBUFFER_EMPTY 0
189 #define SECBUFFER_DATA 1
190 #define SECBUFFER_TOKEN 2
191 #define SECBUFFER_PKG_PARAMS 3
192 #define SECBUFFER_MISSING 4
193 #define SECBUFFER_EXTRA 5
194 #define SECBUFFER_STREAM_TRAILER 6
195 #define SECBUFFER_STREAM_HEADER 7
196 #define SECBUFFER_NEGOTIATION_INFO 8
197 #define SECBUFFER_PADDING 9
198 #define SECBUFFER_STREAM 10
199 #define SECBUFFER_MECHLIST 11
200 #define SECBUFFER_MECHLIST_SIGNATURE 12
201 #define SECBUFFER_TARGET 13
202 #define SECBUFFER_CHANNEL_BINDINGS 14
204 #define SECBUFFER_ATTRMASK 0xf0000000
205 #define SECBUFFER_READONLY 0x80000000
206 #define SECBUFFER_READONLY_WITH_CHECKSUM 0x10000000
207 #define SECBUFFER_RESERVED 0x60000000
209 typedef struct _SecBufferDesc
214 } SecBufferDesc
, *PSecBufferDesc
;
216 /* values for ulVersion */
217 #define SECBUFFER_VERSION 0
219 typedef void (SEC_ENTRY
*SEC_GET_KEY_FN
)(void *Arg
, void *Principal
,
220 ULONG KeyVer
, void **Key
, SECURITY_STATUS
*Status
);
222 SECURITY_STATUS SEC_ENTRY
EnumerateSecurityPackagesA(PULONG pcPackages
,
223 PSecPkgInfoA
*ppPackageInfo
);
224 SECURITY_STATUS SEC_ENTRY
EnumerateSecurityPackagesW(PULONG pcPackages
,
225 PSecPkgInfoW
*ppPackageInfo
);
226 #define EnumerateSecurityPackages WINELIB_NAME_AW(EnumerateSecurityPackages)
228 typedef SECURITY_STATUS (SEC_ENTRY
*ENUMERATE_SECURITY_PACKAGES_FN_A
)(PULONG
,
230 typedef SECURITY_STATUS (SEC_ENTRY
*ENUMERATE_SECURITY_PACKAGES_FN_W
)(PULONG
,
232 #define ENUMERATE_SECURITY_PACKAGES_FN WINELIB_NAME_AW(ENUMERATE_SECURITY_PACKAGES_FN_)
234 SECURITY_STATUS SEC_ENTRY
QueryCredentialsAttributesA(
235 PCredHandle phCredential
, ULONG ulAttribute
, void *pBuffer
);
236 SECURITY_STATUS SEC_ENTRY
QueryCredentialsAttributesW(
237 PCredHandle phCredential
, ULONG ulAttribute
, void *pBuffer
);
238 #define QueryCredentialsAttributes WINELIB_NAME_AW(QueryCredentialsAttributes)
240 typedef SECURITY_STATUS (SEC_ENTRY
*QUERY_CREDENTIALS_ATTRIBUTES_FN_A
)
241 (PCredHandle
, ULONG
, PVOID
);
242 typedef SECURITY_STATUS (SEC_ENTRY
*QUERY_CREDENTIALS_ATTRIBUTES_FN_W
)
243 (PCredHandle
, ULONG
, PVOID
);
244 #define QUERY_CREDENTIALS_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CREDENTIALS_ATTRIBUTES_FN_)
246 typedef struct _SEC_CHANNEL_BINDINGS
{
247 ULONG dwInitiatorAddrType
;
248 ULONG cbInitiatorLength
;
249 ULONG dwInitiatorOffset
;
250 ULONG dwAcceptorAddrType
;
251 ULONG cbAcceptorLength
;
252 ULONG dwAcceptorOffset
;
253 ULONG cbApplicationDataLength
;
254 ULONG dwApplicationDataOffset
;
255 } SEC_CHANNEL_BINDINGS
, *PSEC_CHANNEL_BINDINGS
;
257 /* values for QueryCredentialsAttributes ulAttribute */
258 #define SECPKG_CRED_ATTR_NAMES 1
260 /* types for QueryCredentialsAttributes */
261 typedef struct _SecPkgCredentials_NamesA
264 } SecPkgCredentials_NamesA
, *PSecPkgCredentials_NamesA
;
266 typedef struct _SecPkgCredentials_NamesW
268 SEC_WCHAR
*sUserName
;
269 } SecPkgCredentials_NamesW
, *PSecPkgCredentials_NamesW
;
271 #define SecPkgCredentials_Names WINELIB_NAME_AW(SecPkgCredentials_Names)
273 SECURITY_STATUS SEC_ENTRY
AcquireCredentialsHandleA(
274 SEC_CHAR
*pszPrincipal
, SEC_CHAR
*pszPackage
, ULONG fCredentialsUse
,
275 PLUID pvLogonID
, PVOID pAuthData
, SEC_GET_KEY_FN pGetKeyFn
,
276 PVOID pvGetKeyArgument
, PCredHandle phCredential
, PTimeStamp ptsExpiry
);
277 SECURITY_STATUS SEC_ENTRY
AcquireCredentialsHandleW(
278 SEC_WCHAR
*pszPrincipal
, SEC_WCHAR
*pszPackage
, ULONG fCredentialsUse
,
279 PLUID pvLogonID
, PVOID pAuthData
, SEC_GET_KEY_FN pGetKeyFn
,
280 PVOID pvGetKeyArgument
, PCredHandle phCredential
, PTimeStamp ptsExpiry
);
281 #define AcquireCredentialsHandle WINELIB_NAME_AW(AcquireCredentialsHandle)
283 /* flags for fCredentialsUse */
284 #define SECPKG_CRED_INBOUND 0x00000001
285 #define SECPKG_CRED_OUTBOUND 0x00000002
286 #define SECPKG_CRED_BOTH (SECPKG_CRED_INBOUND | SECPKG_CRED_OUTBOUND)
287 #define SECPKG_CRED_DEFAULT 0x00000004
288 #define SECPKG_CRED_RESERVED 0xf0000000
290 typedef SECURITY_STATUS (SEC_ENTRY
*ACQUIRE_CREDENTIALS_HANDLE_FN_A
)(
291 SEC_CHAR
*, SEC_CHAR
*, ULONG
, PLUID
, PVOID
, SEC_GET_KEY_FN
, PVOID
,
292 PCredHandle
, PTimeStamp
);
293 typedef SECURITY_STATUS (SEC_ENTRY
*ACQUIRE_CREDENTIALS_HANDLE_FN_W
)(
294 SEC_WCHAR
*, SEC_WCHAR
*, ULONG
, PLUID
, PVOID
, SEC_GET_KEY_FN
, PVOID
,
295 PCredHandle
, PTimeStamp
);
296 #define ACQUIRE_CREDENTIALS_HANDLE_FN WINELIB_NAME_AW(ACQUIRE_CREDENTIALS_HANDLE_FN_)
298 SECURITY_STATUS SEC_ENTRY
FreeContextBuffer(PVOID pv
);
300 typedef SECURITY_STATUS (SEC_ENTRY
*FREE_CONTEXT_BUFFER_FN
)(PVOID
);
302 SECURITY_STATUS SEC_ENTRY
FreeCredentialsHandle(PCredHandle
305 #define FreeCredentialHandle FreeCredentialsHandle
307 typedef SECURITY_STATUS (SEC_ENTRY
*FREE_CREDENTIALS_HANDLE_FN
)(PCredHandle
);
309 SECURITY_STATUS SEC_ENTRY
InitializeSecurityContextA(
310 PCredHandle phCredential
, PCtxtHandle phContext
,
311 SEC_CHAR
*pszTargetName
, ULONG fContextReq
,
312 ULONG Reserved1
, ULONG TargetDataRep
, PSecBufferDesc pInput
,
313 ULONG Reserved2
, PCtxtHandle phNewContext
, PSecBufferDesc pOutput
,
314 ULONG
*pfContextAttr
, PTimeStamp ptsExpiry
);
315 SECURITY_STATUS SEC_ENTRY
InitializeSecurityContextW(
316 PCredHandle phCredential
, PCtxtHandle phContext
,
317 SEC_WCHAR
*pszTargetName
, ULONG fContextReq
,
318 ULONG Reserved1
, ULONG TargetDataRep
, PSecBufferDesc pInput
,
319 ULONG Reserved2
, PCtxtHandle phNewContext
, PSecBufferDesc pOutput
,
320 ULONG
*pfContextAttr
, PTimeStamp ptsExpiry
);
321 #define InitializeSecurityContext WINELIB_NAME_AW(InitializeSecurityContext)
323 typedef SECURITY_STATUS (SEC_ENTRY
*INITIALIZE_SECURITY_CONTEXT_FN_A
)
324 (PCredHandle
, PCtxtHandle
, SEC_CHAR
*, ULONG
, ULONG
, ULONG
, PSecBufferDesc
,
325 ULONG
, PCtxtHandle
, PSecBufferDesc
, ULONG
*, PTimeStamp
);
326 typedef SECURITY_STATUS (SEC_ENTRY
*INITIALIZE_SECURITY_CONTEXT_FN_W
)
327 (PCredHandle
, PCtxtHandle
, SEC_WCHAR
*, ULONG
, ULONG
, ULONG
, PSecBufferDesc
,
328 ULONG
, PCtxtHandle
, PSecBufferDesc
, ULONG
*, PTimeStamp
);
329 #define INITIALIZE_SECURITY_CONTEXT_FN WINELIB_NAME_AW(INITIALIZE_SECURITY_CONTEXT_FN_)
331 /* flags for InitializeSecurityContext fContextReq and pfContextAttr */
332 #define ISC_REQ_DELEGATE 0x00000001
333 #define ISC_REQ_MUTUAL_AUTH 0x00000002
334 #define ISC_REQ_REPLAY_DETECT 0x00000004
335 #define ISC_REQ_SEQUENCE_DETECT 0x00000008
336 #define ISC_REQ_CONFIDENTIALITY 0x00000010
337 #define ISC_REQ_USE_SESSION_KEY 0x00000020
338 #define ISC_REQ_PROMPT_FOR_CREDS 0x00000040
339 #define ISC_REQ_USE_SUPPLIED_CREDS 0x00000080
340 #define ISC_REQ_ALLOCATE_MEMORY 0x00000100
341 #define ISC_REQ_USE_DCE_STYLE 0x00000200
342 #define ISC_REQ_DATAGRAM 0x00000400
343 #define ISC_REQ_CONNECTION 0x00000800
344 #define ISC_REQ_CALL_LEVEL 0x00001000
345 #define ISC_REQ_FRAGMENT_SUPPLIED 0x00002000
346 #define ISC_REQ_EXTENDED_ERROR 0x00004000
347 #define ISC_REQ_STREAM 0x00008000
348 #define ISC_REQ_INTEGRITY 0x00010000
349 #define ISC_REQ_IDENTIFY 0x00020000
350 #define ISC_REQ_NULL_SESSION 0x00040000
351 #define ISC_REQ_MANUAL_CRED_VALIDATION 0x00080000
352 #define ISC_REQ_RESERVED1 0x00100000
353 #define ISC_REQ_FRAGMENT_TO_FIT 0x00200000
355 #define ISC_RET_DELEGATE 0x00000001
356 #define ISC_RET_MUTUAL_AUTH 0x00000002
357 #define ISC_RET_REPLAY_DETECT 0x00000004
358 #define ISC_RET_SEQUENCE_DETECT 0x00000008
359 #define ISC_RET_CONFIDENTIALITY 0x00000010
360 #define ISC_RET_USE_SESSION_KEY 0x00000020
361 #define ISC_RET_USED_COLLECTED_CREDS 0x00000040
362 #define ISC_RET_USED_SUPPLIED_CREDS 0x00000080
363 #define ISC_RET_ALLOCATED_MEMORY 0x00000100
364 #define ISC_RET_USED_DCE_STYLE 0x00000200
365 #define ISC_RET_DATAGRAM 0x00000400
366 #define ISC_RET_CONNECTION 0x00000800
367 #define ISC_RET_INTERMEDIATE_RETURN 0x00001000
368 #define ISC_RET_CALL_LEVEL 0x00002000
369 #define ISC_RET_EXTENDED_ERROR 0x00004000
370 #define ISC_RET_STREAM 0x00008000
371 #define ISC_RET_INTEGRITY 0x00010000
372 #define ISC_RET_IDENTIFY 0x00020000
373 #define ISC_RET_NULL_SESSION 0x00040000
374 #define ISC_RET_MANUAL_CRED_VALIDATION 0x00080000
375 #define ISC_RET_RESERVED1 0x00100000
376 #define ISC_RET_FRAGMENT_ONLY 0x00200000
378 SECURITY_STATUS SEC_ENTRY
AcceptSecurityContext(
379 PCredHandle phCredential
, PCtxtHandle phContext
, PSecBufferDesc pInput
,
380 ULONG fContextReq
, ULONG TargetDataRep
,
381 PCtxtHandle phNewContext
, PSecBufferDesc pOutput
,
382 ULONG
*pfContextAttr
, PTimeStamp ptsExpiry
);
384 typedef SECURITY_STATUS (SEC_ENTRY
*ACCEPT_SECURITY_CONTEXT_FN
)(PCredHandle
,
385 PCtxtHandle
, PSecBufferDesc
, ULONG
, ULONG
, PCtxtHandle
,
386 PSecBufferDesc
, ULONG
*, PTimeStamp
);
388 /* flags for AcceptSecurityContext fContextReq and pfContextAttr */
389 #define ASC_REQ_DELEGATE 0x00000001
390 #define ASC_REQ_MUTUAL_AUTH 0x00000002
391 #define ASC_REQ_REPLAY_DETECT 0x00000004
392 #define ASC_REQ_SEQUENCE_DETECT 0x00000008
393 #define ASC_REQ_CONFIDENTIALITY 0x00000010
394 #define ASC_REQ_USE_SESSION_KEY 0x00000020
395 #define ASC_REQ_ALLOCATE_MEMORY 0x00000100
396 #define ASC_REQ_USE_DCE_STYLE 0x00000200
397 #define ASC_REQ_DATAGRAM 0x00000400
398 #define ASC_REQ_CONNECTION 0x00000800
399 #define ASC_REQ_CALL_LEVEL 0x00001000
400 #define ASC_REQ_FRAGMENT_SUPPLIED 0x00002000
401 #define ASC_REQ_EXTENDED_ERROR 0x00008000
402 #define ASC_REQ_STREAM 0x00010000
403 #define ASC_REQ_INTEGRITY 0x00020000
404 #define ASC_REQ_LICENSING 0x00040000
405 #define ASC_REQ_IDENTIFY 0x00080000
406 #define ASC_REQ_ALLOW_NULL_SESSION 0x00100000
407 #define ASC_REQ_ALLOW_NON_USER_LOGONS 0x00200000
408 #define ASC_REQ_ALLOW_CONTEXT_REPLAY 0x00400000
409 #define ASC_REQ_FRAGMENT_TO_FIT 0x00800000
410 #define ASC_REQ_FRAGMENT_NO_TOKEN 0x01000000
412 #define ASC_RET_DELEGATE 0x00000001
413 #define ASC_RET_MUTUAL_AUTH 0x00000002
414 #define ASC_RET_REPLAY_DETECT 0x00000004
415 #define ASC_RET_SEQUENCE_DETECT 0x00000008
416 #define ASC_RET_CONFIDENTIALITY 0x00000010
417 #define ASC_RET_USE_SESSION_KEY 0x00000020
418 #define ASC_RET_ALLOCATED_MEMORY 0x00000100
419 #define ASC_RET_USED_DCE_STYLE 0x00000200
420 #define ASC_RET_DATAGRAM 0x00000400
421 #define ASC_RET_CONNECTION 0x00000800
422 #define ASC_RET_CALL_LEVEL 0x00002000
423 #define ASC_RET_THIRD_LEG_FAILED 0x00004000
424 #define ASC_RET_EXTENDED_ERROR 0x00008000
425 #define ASC_RET_STREAM 0x00010000
426 #define ASC_RET_INTEGRITY 0x00020000
427 #define ASC_RET_LICENSING 0x00040000
428 #define ASC_RET_IDENTIFY 0x00080000
429 #define ASC_RET_NULL_SESSION 0x00100000
430 #define ASC_RET_ALLOW_NON_USER_LOGONS 0x00200000
431 #define ASC_RET_ALLOW_CONTEXT_REPLAY 0x00400000
432 #define ASC_RET_FRAGMENT_ONLY 0x00800000
433 #define ASC_RET_NO_TOKEN 0x01000000
435 /* values for TargetDataRep */
436 #define SECURITY_NATIVE_DREP 0x00000010
437 #define SECURITY_NETWORK_DREP 0x00000000
439 SECURITY_STATUS SEC_ENTRY
CompleteAuthToken(PCtxtHandle phContext
,
440 PSecBufferDesc pToken
);
442 typedef SECURITY_STATUS (SEC_ENTRY
*COMPLETE_AUTH_TOKEN_FN
)(PCtxtHandle
,
445 SECURITY_STATUS SEC_ENTRY
DeleteSecurityContext(PCtxtHandle phContext
);
447 typedef SECURITY_STATUS (SEC_ENTRY
*DELETE_SECURITY_CONTEXT_FN
)(PCtxtHandle
);
449 SECURITY_STATUS SEC_ENTRY
ApplyControlToken(PCtxtHandle phContext
,
450 PSecBufferDesc pInput
);
452 typedef SECURITY_STATUS (SEC_ENTRY
*APPLY_CONTROL_TOKEN_FN
)(PCtxtHandle
,
455 SECURITY_STATUS SEC_ENTRY
QueryContextAttributesA(PCtxtHandle phContext
,
456 ULONG ulAttribute
, void *pBuffer
);
457 SECURITY_STATUS SEC_ENTRY
QueryContextAttributesW(PCtxtHandle phContext
,
458 ULONG ulAttribute
, void *pBuffer
);
459 #define QueryContextAttributes WINELIB_NAME_AW(QueryContextAttributes)
461 typedef SECURITY_STATUS (SEC_ENTRY
*QUERY_CONTEXT_ATTRIBUTES_FN_A
)(PCtxtHandle
,
463 typedef SECURITY_STATUS (SEC_ENTRY
*QUERY_CONTEXT_ATTRIBUTES_FN_W
)(PCtxtHandle
,
465 #define QUERY_CONTEXT_ATTRIBUTES_FN WINELIB_NAME_AW(QUERY_CONTEXT_ATTRIBUTES_FN_)
467 /* values for QueryContextAttributes/SetContextAttributes ulAttribute */
468 #define SECPKG_ATTR_SIZES 0
469 #define SECPKG_ATTR_NAMES 1
470 #define SECPKG_ATTR_LIFESPAN 2
471 #define SECPKG_ATTR_DCE_INFO 3
472 #define SECPKG_ATTR_STREAM_SIZES 4
473 #define SECPKG_ATTR_KEY_INFO 5
474 #define SECPKG_ATTR_AUTHORITY 6
475 #define SECPKG_ATTR_PROTO_INFO 7
476 #define SECPKG_ATTR_PASSWORD_EXPIRY 8
477 #define SECPKG_ATTR_SESSION_KEY 9
478 #define SECPKG_ATTR_PACKAGE_INFO 10
479 #define SECPKG_ATTR_USER_FLAGS 11
480 #define SECPKG_ATTR_NEGOTIATION_INFO 12
481 #define SECPKG_ATTR_NATIVE_NAMES 13
482 #define SECPKG_ATTR_FLAGS 14
483 #define SECPKG_ATTR_USE_VALIDATED 15
484 #define SECPKG_ATTR_CREDENTIAL_NAME 16
485 #define SECPKG_ATTR_TARGET_INFORMATION 17
486 #define SECPKG_ATTR_ACCESS_TOKEN 18
487 #define SECPKG_ATTR_TARGET 19
488 #define SECPKG_ATTR_AUTHENTICATION_ID 20
489 #define SECPKG_ATTR_LOGOFF_TIME 21
490 #define SECPKG_ATTR_NEGO_KEYS 22
491 #define SECPKG_ATTR_PROMPTING_NEEDED 24
492 #define SECPKG_ATTR_UNIQUE_BINDINGS 25
493 #define SECPKG_ATTR_ENDPOINT_BINDINGS 26
494 #define SECPKG_ATTR_CLIENT_SPECIFIED_TARGET 27
495 #define SECPKG_ATTR_LAST_CLIENT_TOKEN_STATUS 30
496 #define SECPKG_ATTR_NEGO_PKG_INFO 31
497 #define SECPKG_ATTR_NEGO_STATUS 32
498 #define SECPKG_ATTR_CONTEXT_DELETED 33
500 #define SECPKG_ATTR_SUBJECT_SECURITY_ATTRIBUTES 128
501 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_KERBEROS 0x1
502 #define SECPKG_ATTR_NEGO_INFO_FLAG_NO_NTLM 0x2
504 /* types for QueryContextAttributes/SetContextAttributes */
506 typedef struct _SecPkgContext_Sizes
509 ULONG cbMaxSignature
;
511 ULONG cbSecurityTrailer
;
512 } SecPkgContext_Sizes
, *PSecPkgContext_Sizes
;
514 typedef struct _SecPkgContext_StreamSizes
518 ULONG cbMaximumMessage
;
521 } SecPkgContext_StreamSizes
, *PSecPkgContext_StreamSizes
;
523 typedef struct _SecPkgContext_NamesA
526 } SecPkgContext_NamesA
, *PSecPkgContext_NamesA
;
528 typedef struct _SecPkgContext_NamesW
530 SEC_WCHAR
*sUserName
;
531 } SecPkgContext_NamesW
, *PSecPkgContext_NamesW
;
533 #define SecPkgContext_Names WINELIB_NAME_AW(SecPkgContext_Names)
534 #define PSecPkgContext_Names WINELIB_NAME_AW(PSecPkgContext_Names)
536 typedef struct _SecPkgContext_Lifespan
540 } SecPkgContext_Lifespan
, *PSecPkgContext_Lifespan
;
542 typedef struct _SecPkgContext_DceInfo
546 } SecPkgContext_DceInfo
, *PSecPkgContext_DceInfo
;
548 typedef struct _SecPkgContext_KeyInfoA
550 SEC_CHAR
*sSignatureAlgorithmName
;
551 SEC_CHAR
*sEncryptAlgorithmName
;
553 ULONG SignatureAlgorithm
;
554 ULONG EncryptAlgorithm
;
555 } SecPkgContext_KeyInfoA
, *PSecPkgContext_KeyInfoA
;
557 typedef struct _SecPkgContext_KeyInfoW
559 SEC_WCHAR
*sSignatureAlgorithmName
;
560 SEC_WCHAR
*sEncryptAlgorithmName
;
562 ULONG SignatureAlgorithm
;
563 ULONG EncryptAlgorithm
;
564 } SecPkgContext_KeyInfoW
, *PSecPkgContext_KeyInfoW
;
566 #define SecPkgContext_KeyInfo WINELIB_NAME_AW(SecPkgContext_KeyInfo)
567 #define PSecPkgContext_KeyInfo WINELIB_NAME_AW(PSecPkgContext_KeyInfo)
569 typedef struct _SecPkgContext_AuthorityA
571 SEC_CHAR
*sAuthorityName
;
572 } SecPkgContext_AuthorityA
, *PSecPkgContext_AuthorityA
;
574 typedef struct _SecPkgContext_AuthorityW
576 SEC_WCHAR
*sAuthorityName
;
577 } SecPkgContext_AuthorityW
, *PSecPkgContext_AuthorityW
;
579 #define SecPkgContext_Authority WINELIB_NAME_AW(SecPkgContext_Authority)
580 #define PSecPkgContext_Authority WINELIB_NAME_AW(PSecPkgContext_Authority)
582 typedef struct _SecPkgContext_ProtoInfoA
584 SEC_CHAR
*sProtocolName
;
587 } SecPkgContext_ProtoInfoA
, *PSecPkgContext_ProtoInfoA
;
589 typedef struct _SecPkgContext_ProtoInfoW
591 SEC_WCHAR
*sProtocolName
;
594 } SecPkgContext_ProtoInfoW
, *PSecPkgContext_ProtoInfoW
;
596 #define SecPkgContext_ProtoInfo WINELIB_NAME_AW(SecPkgContext_ProtoInfo)
597 #define PSecPkgContext_ProtoInfo WINELIB_NAME_AW(PSecPkgContext_ProtoInfo)
599 typedef struct _SecPkgContext_PasswordExpiry
601 TimeStamp tsPasswordExpires
;
602 } SecPkgContext_PasswordExpiry
, *PSecPkgContext_PasswordExpiry
;
604 typedef struct _SecPkgContext_SessionKey
606 ULONG SessionKeyLength
;
607 unsigned char *SessionKey
;
608 } SecPkgContext_SessionKey
, *PSecPkgContext_SessionKey
;
610 typedef struct _SecPkgContext_PackageInfoA
612 PSecPkgInfoA PackageInfo
;
613 } SecPkgContext_PackageInfoA
, *PSecPkgContext_PackageInfoA
;
615 typedef struct _SecPkgContext_PackageInfoW
617 PSecPkgInfoW PackageInfo
;
618 } SecPkgContext_PackageInfoW
, *PSecPkgContext_PackageInfoW
;
620 #define SecPkgContext_PackageInfo WINELIB_NAME_AW(SecPkgContext_PackageInfo)
621 #define PSecPkgContext_PackageInfo WINELIB_NAME_AW(PSecPkgContext_PackageInfo)
623 typedef struct _SecPkgContext_Flags
626 } SecPkgContext_Flags
, *PSecPkgContext_Flags
;
628 typedef struct _SecPkgContext_UserFlags
631 } SecPkgContext_UserFlags
, *PSecPkgContext_UserFlags
;
633 typedef struct _SecPkgContext_NegotiationInfoA
635 PSecPkgInfoA PackageInfo
;
636 ULONG NegotiationState
;
637 } SecPkgContext_NegotiationInfoA
, *PSecPkgContext_NegotiationInfoA
;
639 typedef struct _SecPkgContext_NegotiationInfoW
641 PSecPkgInfoW PackageInfo
;
642 ULONG NegotiationState
;
643 } SecPkgContext_NegotiationInfoW
, *PSecPkgContext_NegotiationInfoW
;
645 #define SecPkgContext_NegotiationInfo WINELIB_NAME_AW(SecPkgContext_NegotiationInfo)
646 #define PSecPkgContext_NegotiationInfo WINELIB_NAME_AW(PSecPkgContext_NegotiationInfo)
648 /* values for NegotiationState */
649 #define SECPKG_NEGOTIATION_COMPLETE 0
650 #define SECPKG_NEGOTIATION_OPTIMISTIC 1
651 #define SECPKG_NEGOTIATION_IN_PROGRESS 2
652 #define SECPKG_NEGOTIATION_DIRECT 3
653 #define SECPKG_NEGOTIATION_TRY_MULTICRED 4
655 typedef struct _SecPkgContext_NativeNamesA
657 SEC_CHAR
*sClientName
;
658 SEC_CHAR
*sServerName
;
659 } SecPkgContext_NativeNamesA
, *PSecPkgContext_NativeNamesA
;
661 typedef struct _SecPkgContext_NativeNamesW
663 SEC_WCHAR
*sClientName
;
664 SEC_WCHAR
*sServerName
;
665 } SecPkgContext_NativeNamesW
, *PSecPkgContext_NativeNamesW
;
667 #define SecPkgContext_NativeNames WINELIB_NAME_AW(SecPkgContext_NativeNames)
668 #define PSecPkgContext_NativeNames WINELIB_NAME_AW(PSecPkgContext_NativeNames)
670 typedef struct _SecPkgContext_CredentialNameA
672 ULONG CredentialType
;
673 SEC_CHAR
*sCredentialName
;
674 } SecPkgContext_CredentialNameA
, *PSecPkgContext_CredentialNameA
;
676 typedef struct _SecPkgContext_CredentialNameW
678 ULONG CredentialType
;
679 SEC_WCHAR
*sCredentialName
;
680 } SecPkgContext_CredentialNameW
, *PSecPkgContext_CredentialNameW
;
682 #define SecPkgContext_CredentialName WINELIB_NAME_AW(SecPkgContext_CredentialName)
683 #define PSecPkgContext_CredentialName WINELIB_NAME_AW(PSecPkgContext_CredentialName)
685 typedef struct _SecPkgContext_AccessToken
688 } SecPkgContext_AccessToken
, *PSecPkgContext_AccessToken
;
690 typedef struct _SecPkgContext_TargetInformation
692 ULONG MarshalledTargetInfoLength
;
693 unsigned char *MarshalledTargetInfo
;
694 } SecPkgContext_TargetInformation
, *PSecPkgContext_TargetInformation
;
696 typedef struct _SecPkgContext_AuthzID
700 } SecPkgContext_AuthzID
, *PSecPkgContext_AuthzID
;
702 typedef struct _SecPkgContext_Target
706 } SecPkgContext_Target
, *PSecPkgContext_Target
;
708 typedef struct _SecPkgContext_Bindings
710 ULONG BindingsLength
;
711 SEC_CHANNEL_BINDINGS
*Bindings
;
712 } SecPkgContext_Bindings
, *PSecPkgContext_Bindings
;
714 SECURITY_STATUS SEC_ENTRY
ImpersonateSecurityContext(PCtxtHandle phContext
);
716 typedef SECURITY_STATUS (SEC_ENTRY
*IMPERSONATE_SECURITY_CONTEXT_FN
)
719 SECURITY_STATUS SEC_ENTRY
RevertSecurityContext(PCtxtHandle phContext
);
721 typedef SECURITY_STATUS (SEC_ENTRY
*REVERT_SECURITY_CONTEXT_FN
)(PCtxtHandle
);
723 SECURITY_STATUS SEC_ENTRY
MakeSignature(PCtxtHandle phContext
,
724 ULONG fQOP
, PSecBufferDesc pMessage
, ULONG MessageSeqNo
);
726 typedef SECURITY_STATUS (SEC_ENTRY
*MAKE_SIGNATURE_FN
)(PCtxtHandle
,
727 ULONG
, PSecBufferDesc
, ULONG
);
729 SECURITY_STATUS SEC_ENTRY
VerifySignature(PCtxtHandle phContext
,
730 PSecBufferDesc pMessage
, ULONG MessageSeqNo
, PULONG pfQOP
);
732 typedef SECURITY_STATUS (SEC_ENTRY
*VERIFY_SIGNATURE_FN
)(PCtxtHandle
,
733 PSecBufferDesc
, ULONG
, PULONG
);
735 SECURITY_STATUS SEC_ENTRY
QuerySecurityPackageInfoA(
736 SEC_CHAR
*pszPackageName
, PSecPkgInfoA
*ppPackageInfo
);
737 SECURITY_STATUS SEC_ENTRY
QuerySecurityPackageInfoW(
738 SEC_WCHAR
*pszPackageName
, PSecPkgInfoW
*ppPackageInfo
);
739 #define QuerySecurityPackageInfo WINELIB_NAME_AW(QuerySecurityPackageInfo)
741 typedef SECURITY_STATUS (SEC_ENTRY
*QUERY_SECURITY_PACKAGE_INFO_FN_A
)
742 (SEC_CHAR
*, PSecPkgInfoA
*);
743 typedef SECURITY_STATUS (SEC_ENTRY
*QUERY_SECURITY_PACKAGE_INFO_FN_W
)
744 (SEC_WCHAR
*, PSecPkgInfoW
*);
745 #define QUERY_SECURITY_PACKAGE_INFO_FN WINELIB_NAME_AW(QUERY_SECURITY_PACKAGE_INFO_FN_)
747 SECURITY_STATUS SEC_ENTRY
ExportSecurityContext(PCtxtHandle phContext
,
748 ULONG fFlags
, PSecBuffer pPackedContext
, void **pToken
);
750 typedef SECURITY_STATUS (SEC_ENTRY
*EXPORT_SECURITY_CONTEXT_FN
)(PCtxtHandle
,
751 ULONG
, PSecBuffer
, void **);
753 /* values for ExportSecurityContext fFlags */
754 #define SECPKG_CONTEXT_EXPORT_RESET_NEW 0x00000001
755 #define SECPKG_CONTEXT_EXPORT_DELETE_OLD 0x00000002
757 SECURITY_STATUS SEC_ENTRY
ImportSecurityContextA(SEC_CHAR
*pszPackage
,
758 PSecBuffer pPackedContext
, void *Token
, PCtxtHandle phContext
);
759 SECURITY_STATUS SEC_ENTRY
ImportSecurityContextW(SEC_WCHAR
*pszPackage
,
760 PSecBuffer pPackedContext
, void *Token
, PCtxtHandle phContext
);
761 #define ImportSecurityContext WINELIB_NAME_AW(ImportSecurityContext)
763 typedef SECURITY_STATUS (SEC_ENTRY
*IMPORT_SECURITY_CONTEXT_FN_A
)(SEC_CHAR
*,
764 PSecBuffer
, void *, PCtxtHandle
);
765 typedef SECURITY_STATUS (SEC_ENTRY
*IMPORT_SECURITY_CONTEXT_FN_W
)(SEC_WCHAR
*,
766 PSecBuffer
, void *, PCtxtHandle
);
767 #define IMPORT_SECURITY_CONTEXT_FN WINELIB_NAME_AW(IMPORT_SECURITY_CONTEXT_FN_)
769 SECURITY_STATUS SEC_ENTRY
AddCredentialsA(PCredHandle hCredentials
,
770 SEC_CHAR
*pszPrincipal
, SEC_CHAR
*pszPackage
, ULONG fCredentialUse
,
771 void *pAuthData
, SEC_GET_KEY_FN pGetKeyFn
, void *pvGetKeyArgument
,
772 PTimeStamp ptsExpiry
);
773 SECURITY_STATUS SEC_ENTRY
AddCredentialsW(PCredHandle hCredentials
,
774 SEC_WCHAR
*pszPrincipal
, SEC_WCHAR
*pszPackage
, ULONG fCredentialUse
,
775 void *pAuthData
, SEC_GET_KEY_FN pGetKeyFn
, void *pvGetKeyArgument
,
776 PTimeStamp ptsExpiry
);
777 #define AddCredentials WINELIB_NAME_AW(AddCredentials)
779 typedef SECURITY_STATUS (SEC_ENTRY
*ADD_CREDENTIALS_FN_A
)(PCredHandle
,
780 SEC_CHAR
*, SEC_CHAR
*, ULONG
, void *, SEC_GET_KEY_FN
, void *,
782 typedef SECURITY_STATUS (SEC_ENTRY
*ADD_CREDENTIALS_FN_W
)(PCredHandle
,
783 SEC_WCHAR
*, SEC_WCHAR
*, ULONG
, void *, SEC_GET_KEY_FN
, void *,
786 SECURITY_STATUS SEC_ENTRY
QuerySecurityContextToken(PCtxtHandle phContext
,
789 typedef SECURITY_STATUS (SEC_ENTRY
*QUERY_SECURITY_CONTEXT_TOKEN_FN
)
790 (PCtxtHandle
, HANDLE
*);
792 SECURITY_STATUS SEC_ENTRY
EncryptMessage(PCtxtHandle phContext
, ULONG fQOP
,
793 PSecBufferDesc pMessage
, ULONG MessageSeqNo
);
794 SECURITY_STATUS SEC_ENTRY
DecryptMessage(PCtxtHandle phContext
,
795 PSecBufferDesc pMessage
, ULONG MessageSeqNo
, PULONG pfQOP
);
797 /* values for EncryptMessage fQOP */
798 #define SECQOP_WRAP_NO_ENCRYPT 0x80000001
800 typedef SECURITY_STATUS (SEC_ENTRY
*ENCRYPT_MESSAGE_FN
)(PCtxtHandle
, ULONG
,
801 PSecBufferDesc
, ULONG
);
802 typedef SECURITY_STATUS (SEC_ENTRY
*DECRYPT_MESSAGE_FN
)(PCtxtHandle
,
803 PSecBufferDesc
, ULONG
, PULONG
);
805 SECURITY_STATUS SEC_ENTRY
SetContextAttributesA(PCtxtHandle phContext
,
806 ULONG ulAttribute
, void *pBuffer
, ULONG cbBuffer
);
807 SECURITY_STATUS SEC_ENTRY
SetContextAttributesW(PCtxtHandle phContext
,
808 ULONG ulAttribute
, void *pBuffer
, ULONG cbBuffer
);
809 #define SetContextAttributes WINELIB_NAME_AW(SetContextAttributes)
811 typedef SECURITY_STATUS (SEC_ENTRY
*SET_CONTEXT_ATTRIBUTES_FN_A
)(PCtxtHandle
,
812 ULONG
, void *, ULONG
);
813 typedef SECURITY_STATUS (SEC_ENTRY
*SET_CONTEXT_ATTRIBUTES_FN_W
)(PCtxtHandle
,
814 ULONG
, void *, ULONG
);
816 #define SECURITY_ENTRYPOINT_ANSIA "InitSecurityInterfaceA"
817 #define SECURITY_ENTRYPOINT_ANSIW "InitSecurityInterfaceW"
818 #define SECURITY_ENTRYPOINT_ANSI WINELIB_NAME_AW(SECURITY_ENTRYPOINT_ANSI)
820 typedef struct _SECURITY_FUNCTION_TABLE_A
823 ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA
;
824 QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA
;
825 ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA
;
826 FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle
;
828 INITIALIZE_SECURITY_CONTEXT_FN_A InitializeSecurityContextA
;
829 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext
;
830 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken
;
831 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext
;
832 APPLY_CONTROL_TOKEN_FN ApplyControlToken
;
833 QUERY_CONTEXT_ATTRIBUTES_FN_A QueryContextAttributesA
;
834 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext
;
835 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext
;
836 MAKE_SIGNATURE_FN MakeSignature
;
837 VERIFY_SIGNATURE_FN VerifySignature
;
838 FREE_CONTEXT_BUFFER_FN FreeContextBuffer
;
839 QUERY_SECURITY_PACKAGE_INFO_FN_A QuerySecurityPackageInfoA
;
842 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext
;
843 IMPORT_SECURITY_CONTEXT_FN_A ImportSecurityContextA
;
844 ADD_CREDENTIALS_FN_A AddCredentialsA
;
846 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken
;
847 ENCRYPT_MESSAGE_FN EncryptMessage
;
848 DECRYPT_MESSAGE_FN DecryptMessage
;
849 SET_CONTEXT_ATTRIBUTES_FN_A SetContextAttributesA
;
850 } SecurityFunctionTableA
, *PSecurityFunctionTableA
;
852 typedef struct _SECURITY_FUNCTION_TABLE_W
855 ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW
;
856 QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW
;
857 ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW
;
858 FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle
;
860 INITIALIZE_SECURITY_CONTEXT_FN_W InitializeSecurityContextW
;
861 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext
;
862 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken
;
863 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext
;
864 APPLY_CONTROL_TOKEN_FN ApplyControlToken
;
865 QUERY_CONTEXT_ATTRIBUTES_FN_W QueryContextAttributesW
;
866 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext
;
867 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext
;
868 MAKE_SIGNATURE_FN MakeSignature
;
869 VERIFY_SIGNATURE_FN VerifySignature
;
870 FREE_CONTEXT_BUFFER_FN FreeContextBuffer
;
871 QUERY_SECURITY_PACKAGE_INFO_FN_W QuerySecurityPackageInfoW
;
874 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext
;
875 IMPORT_SECURITY_CONTEXT_FN_W ImportSecurityContextW
;
876 ADD_CREDENTIALS_FN_W AddCredentialsW
;
878 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken
;
879 ENCRYPT_MESSAGE_FN EncryptMessage
;
880 DECRYPT_MESSAGE_FN DecryptMessage
;
881 SET_CONTEXT_ATTRIBUTES_FN_W SetContextAttributesW
;
882 } SecurityFunctionTableW
, *PSecurityFunctionTableW
;
884 #define SecurityFunctionTable WINELIB_NAME_AW(SecurityFunctionTable)
885 #define PSecurityFunctionTable WINELIB_NAME_AW(PSecurityFunctionTable)
887 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION 1
888 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 2
890 PSecurityFunctionTableA SEC_ENTRY
InitSecurityInterfaceA(void);
891 PSecurityFunctionTableW SEC_ENTRY
InitSecurityInterfaceW(void);
892 #define InitSecurityInterface WINELIB_NAME_AW(InitSecurityInterface)
894 typedef PSecurityFunctionTableA (SEC_ENTRY
*INIT_SECURITY_INTERFACE_A
)(void);
895 typedef PSecurityFunctionTableW (SEC_ENTRY
*INIT_SECURITY_INTERFACE_W
)(void);
896 #define INIT_SECURITY_INTERFACE WINELIB_NAME_AW(INIT_SECURITY_INTERFACE_)
902 #endif /* ndef __WINE_SSPI_H__ */