Mercurial > games > semicongine
comparison fuhtark_test/include/winapi/sspi.h @ 1500:91c8c3b7cbf0
add: futhark tests for generating vulkan api
| author | sam <sam@basx.dev> |
|---|---|
| date | Wed, 26 Nov 2025 21:36:48 +0700 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1499:1f58458b7ef7 | 1500:91c8c3b7cbf0 |
|---|---|
| 1 /** | |
| 2 * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 * This file is part of the w64 mingw-runtime package. | |
| 4 * No warranty is given; refer to the file DISCLAIMER within this package. | |
| 5 */ | |
| 6 #ifndef __SSPI_H__ | |
| 7 #define __SSPI_H__ | |
| 8 | |
| 9 #include <ntsecapi.h> | |
| 10 | |
| 11 #ifdef __cplusplus | |
| 12 extern "C" { | |
| 13 #endif | |
| 14 | |
| 15 #ifdef SECURITY_WIN32 | |
| 16 #define ISSP_LEVEL 32 | |
| 17 #define ISSP_MODE 1 | |
| 18 #endif | |
| 19 | |
| 20 #ifdef SECURITY_KERNEL | |
| 21 #define ISSP_LEVEL 32 | |
| 22 | |
| 23 #ifdef ISSP_MODE | |
| 24 #undef ISSP_MODE | |
| 25 #endif | |
| 26 #define ISSP_MODE 0 | |
| 27 #endif | |
| 28 | |
| 29 #ifdef SECURITY_MAC | |
| 30 #define ISSP_LEVEL 32 | |
| 31 #define ISSP_MODE 1 | |
| 32 #endif | |
| 33 | |
| 34 #ifndef ISSP_LEVEL | |
| 35 #error You must define one of SECURITY_WIN32,SECURITY_KERNEL,or | |
| 36 #error SECURITY_MAC | |
| 37 #endif | |
| 38 | |
| 39 #if defined(_NO_KSECDD_IMPORT_) | |
| 40 | |
| 41 #define KSECDDDECLSPEC | |
| 42 #else | |
| 43 | |
| 44 #define KSECDDDECLSPEC __declspec(dllimport) | |
| 45 #endif | |
| 46 | |
| 47 typedef WCHAR SEC_WCHAR; | |
| 48 typedef CHAR SEC_CHAR; | |
| 49 | |
| 50 #ifndef __SECSTATUS_DEFINED__ | |
| 51 typedef LONG SECURITY_STATUS; | |
| 52 #define __SECSTATUS_DEFINED__ | |
| 53 #endif | |
| 54 | |
| 55 #ifndef WINAPI | |
| 56 #define WINAPI __stdcall | |
| 57 #endif | |
| 58 | |
| 59 #define SEC_TEXT TEXT | |
| 60 #define SEC_FAR | |
| 61 #define __SEC_FAR | |
| 62 #define SEC_ENTRY WINAPI | |
| 63 | |
| 64 #ifdef UNICODE | |
| 65 typedef SEC_WCHAR *SECURITY_PSTR; | |
| 66 typedef CONST SEC_WCHAR *SECURITY_PCSTR; | |
| 67 #else | |
| 68 typedef SEC_CHAR *SECURITY_PSTR; | |
| 69 typedef CONST SEC_CHAR *SECURITY_PCSTR; | |
| 70 #endif | |
| 71 | |
| 72 | |
| 73 #ifndef __SECHANDLE_DEFINED__ | |
| 74 typedef struct _SecHandle { | |
| 75 ULONG_PTR dwLower; | |
| 76 ULONG_PTR dwUpper; | |
| 77 } SecHandle,*PSecHandle; | |
| 78 | |
| 79 #define __SECHANDLE_DEFINED__ | |
| 80 #endif | |
| 81 | |
| 82 #define SecInvalidateHandle(x) ((PSecHandle) x)->dwLower = ((ULONG_PTR) ((INT_PTR)-1)); ((PSecHandle) x)->dwUpper = ((ULONG_PTR) ((INT_PTR)-1)); | |
| 83 #define SecIsValidHandle(x) ((((PSecHandle) x)->dwLower!=((ULONG_PTR) ((INT_PTR) -1))) && (((PSecHandle) x)->dwUpper!=((ULONG_PTR) ((INT_PTR) -1)))) | |
| 84 | |
| 85 typedef SecHandle CredHandle; | |
| 86 typedef PSecHandle PCredHandle; | |
| 87 | |
| 88 typedef SecHandle CtxtHandle; | |
| 89 typedef PSecHandle PCtxtHandle; | |
| 90 | |
| 91 #ifdef WIN32_CHICAGO | |
| 92 __MINGW_EXTENSION typedef unsigned __int64 QWORD; | |
| 93 typedef QWORD SECURITY_INTEGER,*PSECURITY_INTEGER; | |
| 94 #define SEC_SUCCESS(Status) ((Status) >= 0) | |
| 95 #elif defined(_NTDEF_) || defined(_WINNT_) | |
| 96 typedef LARGE_INTEGER _SECURITY_INTEGER,SECURITY_INTEGER,*PSECURITY_INTEGER; | |
| 97 #else | |
| 98 typedef struct _SECURITY_INTEGER { | |
| 99 unsigned long LowPart; | |
| 100 long HighPart; | |
| 101 } SECURITY_INTEGER,*PSECURITY_INTEGER; | |
| 102 #endif | |
| 103 | |
| 104 #ifndef SECURITY_MAC | |
| 105 typedef SECURITY_INTEGER TimeStamp; | |
| 106 typedef SECURITY_INTEGER *PTimeStamp; | |
| 107 #else | |
| 108 typedef unsigned long TimeStamp; | |
| 109 typedef unsigned long *PTimeStamp; | |
| 110 #endif | |
| 111 | |
| 112 #ifndef _NTDEF_ | |
| 113 typedef struct _SECURITY_STRING { | |
| 114 unsigned short Length; | |
| 115 unsigned short MaximumLength; | |
| 116 unsigned short *Buffer; | |
| 117 } SECURITY_STRING,*PSECURITY_STRING; | |
| 118 #else | |
| 119 typedef UNICODE_STRING SECURITY_STRING,*PSECURITY_STRING; | |
| 120 #endif | |
| 121 | |
| 122 typedef struct _SecPkgInfoW { | |
| 123 unsigned long fCapabilities; | |
| 124 unsigned short wVersion; | |
| 125 unsigned short wRPCID; | |
| 126 unsigned long cbMaxToken; | |
| 127 SEC_WCHAR *Name; | |
| 128 SEC_WCHAR *Comment; | |
| 129 } SecPkgInfoW,*PSecPkgInfoW; | |
| 130 | |
| 131 typedef struct _SecPkgInfoA { | |
| 132 unsigned long fCapabilities; | |
| 133 unsigned short wVersion; | |
| 134 unsigned short wRPCID; | |
| 135 unsigned long cbMaxToken; | |
| 136 SEC_CHAR *Name; | |
| 137 SEC_CHAR *Comment; | |
| 138 } SecPkgInfoA,*PSecPkgInfoA; | |
| 139 | |
| 140 #ifdef UNICODE | |
| 141 #define SecPkgInfo SecPkgInfoW | |
| 142 #define PSecPkgInfo PSecPkgInfoW | |
| 143 #else | |
| 144 #define SecPkgInfo SecPkgInfoA | |
| 145 #define PSecPkgInfo PSecPkgInfoA | |
| 146 #endif | |
| 147 | |
| 148 #define SECPKG_FLAG_INTEGRITY 0x00000001 | |
| 149 #define SECPKG_FLAG_PRIVACY 0x00000002 | |
| 150 #define SECPKG_FLAG_TOKEN_ONLY 0x00000004 | |
| 151 #define SECPKG_FLAG_DATAGRAM 0x00000008 | |
| 152 #define SECPKG_FLAG_CONNECTION 0x00000010 | |
| 153 #define SECPKG_FLAG_MULTI_REQUIRED 0x00000020 | |
| 154 #define SECPKG_FLAG_CLIENT_ONLY 0x00000040 | |
| 155 #define SECPKG_FLAG_EXTENDED_ERROR 0x00000080 | |
| 156 #define SECPKG_FLAG_IMPERSONATION 0x00000100 | |
| 157 #define SECPKG_FLAG_ACCEPT_WIN32_NAME 0x00000200 | |
| 158 #define SECPKG_FLAG_STREAM 0x00000400 | |
| 159 #define SECPKG_FLAG_NEGOTIABLE 0x00000800 | |
| 160 #define SECPKG_FLAG_GSS_COMPATIBLE 0x00001000 | |
| 161 #define SECPKG_FLAG_LOGON 0x00002000 | |
| 162 #define SECPKG_FLAG_ASCII_BUFFERS 0x00004000 | |
| 163 #define SECPKG_FLAG_FRAGMENT 0x00008000 | |
| 164 #define SECPKG_FLAG_MUTUAL_AUTH 0x00010000 | |
| 165 #define SECPKG_FLAG_DELEGATION 0x00020000 | |
| 166 #define SECPKG_FLAG_READONLY_WITH_CHECKSUM 0x00040000 | |
| 167 | |
| 168 #define SECPKG_ID_NONE 0xFFFF | |
| 169 | |
| 170 typedef struct _SecBuffer { | |
| 171 unsigned long cbBuffer; | |
| 172 unsigned long BufferType; | |
| 173 void *pvBuffer; | |
| 174 } SecBuffer,*PSecBuffer; | |
| 175 | |
| 176 typedef struct _SecBufferDesc { | |
| 177 unsigned long ulVersion; | |
| 178 unsigned long cBuffers; | |
| 179 PSecBuffer pBuffers; | |
| 180 } SecBufferDesc,*PSecBufferDesc; | |
| 181 | |
| 182 #define SECBUFFER_VERSION 0 | |
| 183 | |
| 184 #define SECBUFFER_EMPTY 0 | |
| 185 #define SECBUFFER_DATA 1 | |
| 186 #define SECBUFFER_TOKEN 2 | |
| 187 #define SECBUFFER_PKG_PARAMS 3 | |
| 188 #define SECBUFFER_MISSING 4 | |
| 189 #define SECBUFFER_EXTRA 5 | |
| 190 #define SECBUFFER_STREAM_TRAILER 6 | |
| 191 #define SECBUFFER_STREAM_HEADER 7 | |
| 192 #define SECBUFFER_NEGOTIATION_INFO 8 | |
| 193 #define SECBUFFER_PADDING 9 | |
| 194 #define SECBUFFER_STREAM 10 | |
| 195 #define SECBUFFER_MECHLIST 11 | |
| 196 #define SECBUFFER_MECHLIST_SIGNATURE 12 | |
| 197 #define SECBUFFER_TARGET 13 | |
| 198 #define SECBUFFER_CHANNEL_BINDINGS 14 | |
| 199 | |
| 200 #define SECBUFFER_ATTRMASK 0xF0000000 | |
| 201 #define SECBUFFER_READONLY 0x80000000 | |
| 202 #define SECBUFFER_READONLY_WITH_CHECKSUM 0x10000000 | |
| 203 #define SECBUFFER_RESERVED 0x60000000 | |
| 204 | |
| 205 typedef struct _SEC_NEGOTIATION_INFO { | |
| 206 unsigned long Size; | |
| 207 unsigned long NameLength; | |
| 208 SEC_WCHAR *Name; | |
| 209 void *Reserved; | |
| 210 } SEC_NEGOTIATION_INFO,*PSEC_NEGOTIATION_INFO; | |
| 211 | |
| 212 typedef struct _SEC_CHANNEL_BINDINGS { | |
| 213 unsigned long dwInitiatorAddrType; | |
| 214 unsigned long cbInitiatorLength; | |
| 215 unsigned long dwInitiatorOffset; | |
| 216 unsigned long dwAcceptorAddrType; | |
| 217 unsigned long cbAcceptorLength; | |
| 218 unsigned long dwAcceptorOffset; | |
| 219 unsigned long cbApplicationDataLength; | |
| 220 unsigned long dwApplicationDataOffset; | |
| 221 } SEC_CHANNEL_BINDINGS,*PSEC_CHANNEL_BINDINGS; | |
| 222 | |
| 223 #define SECURITY_NATIVE_DREP 0x00000010 | |
| 224 #define SECURITY_NETWORK_DREP 0x00000000 | |
| 225 | |
| 226 #define SECPKG_CRED_INBOUND 0x00000001 | |
| 227 #define SECPKG_CRED_OUTBOUND 0x00000002 | |
| 228 #define SECPKG_CRED_BOTH 0x00000003 | |
| 229 #define SECPKG_CRED_DEFAULT 0x00000004 | |
| 230 #define SECPKG_CRED_RESERVED 0xF0000000 | |
| 231 | |
| 232 #define ISC_REQ_DELEGATE 0x00000001 | |
| 233 #define ISC_REQ_MUTUAL_AUTH 0x00000002 | |
| 234 #define ISC_REQ_REPLAY_DETECT 0x00000004 | |
| 235 #define ISC_REQ_SEQUENCE_DETECT 0x00000008 | |
| 236 #define ISC_REQ_CONFIDENTIALITY 0x00000010 | |
| 237 #define ISC_REQ_USE_SESSION_KEY 0x00000020 | |
| 238 #define ISC_REQ_PROMPT_FOR_CREDS 0x00000040 | |
| 239 #define ISC_REQ_USE_SUPPLIED_CREDS 0x00000080 | |
| 240 #define ISC_REQ_ALLOCATE_MEMORY 0x00000100 | |
| 241 #define ISC_REQ_USE_DCE_STYLE 0x00000200 | |
| 242 #define ISC_REQ_DATAGRAM 0x00000400 | |
| 243 #define ISC_REQ_CONNECTION 0x00000800 | |
| 244 #define ISC_REQ_CALL_LEVEL 0x00001000 | |
| 245 #define ISC_REQ_FRAGMENT_SUPPLIED 0x00002000 | |
| 246 #define ISC_REQ_EXTENDED_ERROR 0x00004000 | |
| 247 #define ISC_REQ_STREAM 0x00008000 | |
| 248 #define ISC_REQ_INTEGRITY 0x00010000 | |
| 249 #define ISC_REQ_IDENTIFY 0x00020000 | |
| 250 #define ISC_REQ_NULL_SESSION 0x00040000 | |
| 251 #define ISC_REQ_MANUAL_CRED_VALIDATION 0x00080000 | |
| 252 #define ISC_REQ_RESERVED1 0x00100000 | |
| 253 #define ISC_REQ_FRAGMENT_TO_FIT 0x00200000 | |
| 254 | |
| 255 #define ISC_RET_DELEGATE 0x00000001 | |
| 256 #define ISC_RET_MUTUAL_AUTH 0x00000002 | |
| 257 #define ISC_RET_REPLAY_DETECT 0x00000004 | |
| 258 #define ISC_RET_SEQUENCE_DETECT 0x00000008 | |
| 259 #define ISC_RET_CONFIDENTIALITY 0x00000010 | |
| 260 #define ISC_RET_USE_SESSION_KEY 0x00000020 | |
| 261 #define ISC_RET_USED_COLLECTED_CREDS 0x00000040 | |
| 262 #define ISC_RET_USED_SUPPLIED_CREDS 0x00000080 | |
| 263 #define ISC_RET_ALLOCATED_MEMORY 0x00000100 | |
| 264 #define ISC_RET_USED_DCE_STYLE 0x00000200 | |
| 265 #define ISC_RET_DATAGRAM 0x00000400 | |
| 266 #define ISC_RET_CONNECTION 0x00000800 | |
| 267 #define ISC_RET_INTERMEDIATE_RETURN 0x00001000 | |
| 268 #define ISC_RET_CALL_LEVEL 0x00002000 | |
| 269 #define ISC_RET_EXTENDED_ERROR 0x00004000 | |
| 270 #define ISC_RET_STREAM 0x00008000 | |
| 271 #define ISC_RET_INTEGRITY 0x00010000 | |
| 272 #define ISC_RET_IDENTIFY 0x00020000 | |
| 273 #define ISC_RET_NULL_SESSION 0x00040000 | |
| 274 #define ISC_RET_MANUAL_CRED_VALIDATION 0x00080000 | |
| 275 #define ISC_RET_RESERVED1 0x00100000 | |
| 276 #define ISC_RET_FRAGMENT_ONLY 0x00200000 | |
| 277 | |
| 278 #define ASC_REQ_DELEGATE 0x00000001 | |
| 279 #define ASC_REQ_MUTUAL_AUTH 0x00000002 | |
| 280 #define ASC_REQ_REPLAY_DETECT 0x00000004 | |
| 281 #define ASC_REQ_SEQUENCE_DETECT 0x00000008 | |
| 282 #define ASC_REQ_CONFIDENTIALITY 0x00000010 | |
| 283 #define ASC_REQ_USE_SESSION_KEY 0x00000020 | |
| 284 #define ASC_REQ_ALLOCATE_MEMORY 0x00000100 | |
| 285 #define ASC_REQ_USE_DCE_STYLE 0x00000200 | |
| 286 #define ASC_REQ_DATAGRAM 0x00000400 | |
| 287 #define ASC_REQ_CONNECTION 0x00000800 | |
| 288 #define ASC_REQ_CALL_LEVEL 0x00001000 | |
| 289 #define ASC_REQ_EXTENDED_ERROR 0x00008000 | |
| 290 #define ASC_REQ_STREAM 0x00010000 | |
| 291 #define ASC_REQ_INTEGRITY 0x00020000 | |
| 292 #define ASC_REQ_LICENSING 0x00040000 | |
| 293 #define ASC_REQ_IDENTIFY 0x00080000 | |
| 294 #define ASC_REQ_ALLOW_NULL_SESSION 0x00100000 | |
| 295 #define ASC_REQ_ALLOW_NON_USER_LOGONS 0x00200000 | |
| 296 #define ASC_REQ_ALLOW_CONTEXT_REPLAY 0x00400000 | |
| 297 #define ASC_REQ_FRAGMENT_TO_FIT 0x00800000 | |
| 298 #define ASC_REQ_FRAGMENT_SUPPLIED 0x00002000 | |
| 299 #define ASC_REQ_NO_TOKEN 0x01000000 | |
| 300 | |
| 301 #define ASC_RET_DELEGATE 0x00000001 | |
| 302 #define ASC_RET_MUTUAL_AUTH 0x00000002 | |
| 303 #define ASC_RET_REPLAY_DETECT 0x00000004 | |
| 304 #define ASC_RET_SEQUENCE_DETECT 0x00000008 | |
| 305 #define ASC_RET_CONFIDENTIALITY 0x00000010 | |
| 306 #define ASC_RET_USE_SESSION_KEY 0x00000020 | |
| 307 #define ASC_RET_ALLOCATED_MEMORY 0x00000100 | |
| 308 #define ASC_RET_USED_DCE_STYLE 0x00000200 | |
| 309 #define ASC_RET_DATAGRAM 0x00000400 | |
| 310 #define ASC_RET_CONNECTION 0x00000800 | |
| 311 #define ASC_RET_CALL_LEVEL 0x00002000 | |
| 312 #define ASC_RET_THIRD_LEG_FAILED 0x00004000 | |
| 313 #define ASC_RET_EXTENDED_ERROR 0x00008000 | |
| 314 #define ASC_RET_STREAM 0x00010000 | |
| 315 #define ASC_RET_INTEGRITY 0x00020000 | |
| 316 #define ASC_RET_LICENSING 0x00040000 | |
| 317 #define ASC_RET_IDENTIFY 0x00080000 | |
| 318 #define ASC_RET_NULL_SESSION 0x00100000 | |
| 319 #define ASC_RET_ALLOW_NON_USER_LOGONS 0x00200000 | |
| 320 #define ASC_RET_ALLOW_CONTEXT_REPLAY 0x00400000 | |
| 321 #define ASC_RET_FRAGMENT_ONLY 0x00800000 | |
| 322 #define ASC_RET_NO_TOKEN 0x01000000 | |
| 323 | |
| 324 #define SECPKG_CRED_ATTR_NAMES 1 | |
| 325 #define SECPKG_CRED_ATTR_SSI_PROVIDER 2 | |
| 326 | |
| 327 typedef struct _SecPkgCredentials_NamesW | |
| 328 { | |
| 329 SEC_WCHAR *sUserName; | |
| 330 } SecPkgCredentials_NamesW,*PSecPkgCredentials_NamesW; | |
| 331 | |
| 332 typedef struct _SecPkgCredentials_NamesA | |
| 333 { | |
| 334 SEC_CHAR *sUserName; | |
| 335 } SecPkgCredentials_NamesA,*PSecPkgCredentials_NamesA; | |
| 336 | |
| 337 #ifdef UNICODE | |
| 338 #define SecPkgCredentials_Names SecPkgCredentials_NamesW | |
| 339 #define PSecPkgCredentials_Names PSecPkgCredentials_NamesW | |
| 340 #else | |
| 341 #define SecPkgCredentials_Names SecPkgCredentials_NamesA | |
| 342 #define PSecPkgCredentials_Names PSecPkgCredentials_NamesA | |
| 343 #endif | |
| 344 | |
| 345 typedef struct _SecPkgCredentials_SSIProviderW { | |
| 346 SEC_WCHAR *sProviderName; | |
| 347 unsigned long ProviderInfoLength; | |
| 348 char *ProviderInfo; | |
| 349 } SecPkgCredentials_SSIProviderW,*PSecPkgCredentials_SSIProviderW; | |
| 350 | |
| 351 typedef struct _SecPkgCredentials_SSIProviderA { | |
| 352 SEC_CHAR *sProviderName; | |
| 353 unsigned long ProviderInfoLength; | |
| 354 char *ProviderInfo; | |
| 355 } SecPkgCredentials_SSIProviderA,*PSecPkgCredentials_SSIProviderA; | |
| 356 | |
| 357 #ifdef UNICODE | |
| 358 #define SecPkgCredentials_SSIProvider SecPkgCredentials_SSIProviderW | |
| 359 #define PSecPkgCredentials_SSIProvider PSecPkgCredentials_SSIProviderW | |
| 360 #else | |
| 361 #define SecPkgCredentials_SSIProvider SecPkgCredentials_SSIProviderA | |
| 362 #define PSecPkgCredentials_SSIProvider PSecPkgCredentials_SSIProviderA | |
| 363 #endif | |
| 364 | |
| 365 #define SECPKG_ATTR_SIZES 0 | |
| 366 #define SECPKG_ATTR_NAMES 1 | |
| 367 #define SECPKG_ATTR_LIFESPAN 2 | |
| 368 #define SECPKG_ATTR_DCE_INFO 3 | |
| 369 #define SECPKG_ATTR_STREAM_SIZES 4 | |
| 370 #define SECPKG_ATTR_KEY_INFO 5 | |
| 371 #define SECPKG_ATTR_AUTHORITY 6 | |
| 372 #define SECPKG_ATTR_PROTO_INFO 7 | |
| 373 #define SECPKG_ATTR_PASSWORD_EXPIRY 8 | |
| 374 #define SECPKG_ATTR_SESSION_KEY 9 | |
| 375 #define SECPKG_ATTR_PACKAGE_INFO 10 | |
| 376 #define SECPKG_ATTR_USER_FLAGS 11 | |
| 377 #define SECPKG_ATTR_NEGOTIATION_INFO 12 | |
| 378 #define SECPKG_ATTR_NATIVE_NAMES 13 | |
| 379 #define SECPKG_ATTR_FLAGS 14 | |
| 380 #define SECPKG_ATTR_USE_VALIDATED 15 | |
| 381 #define SECPKG_ATTR_CREDENTIAL_NAME 16 | |
| 382 #define SECPKG_ATTR_TARGET_INFORMATION 17 | |
| 383 #define SECPKG_ATTR_ACCESS_TOKEN 18 | |
| 384 #define SECPKG_ATTR_TARGET 19 | |
| 385 #define SECPKG_ATTR_AUTHENTICATION_ID 20 | |
| 386 #define SECPKG_ATTR_LOGOFF_TIME 21 | |
| 387 | |
| 388 typedef struct _SecPkgContext_Sizes { | |
| 389 unsigned long cbMaxToken; | |
| 390 unsigned long cbMaxSignature; | |
| 391 unsigned long cbBlockSize; | |
| 392 unsigned long cbSecurityTrailer; | |
| 393 } SecPkgContext_Sizes,*PSecPkgContext_Sizes; | |
| 394 | |
| 395 typedef struct _SecPkgContext_StreamSizes { | |
| 396 unsigned long cbHeader; | |
| 397 unsigned long cbTrailer; | |
| 398 unsigned long cbMaximumMessage; | |
| 399 unsigned long cBuffers; | |
| 400 unsigned long cbBlockSize; | |
| 401 } SecPkgContext_StreamSizes,*PSecPkgContext_StreamSizes; | |
| 402 | |
| 403 typedef struct _SecPkgContext_NamesW { | |
| 404 SEC_WCHAR *sUserName; | |
| 405 } SecPkgContext_NamesW,*PSecPkgContext_NamesW; | |
| 406 | |
| 407 typedef struct _SecPkgContext_NamesA { | |
| 408 SEC_CHAR *sUserName; | |
| 409 } SecPkgContext_NamesA,*PSecPkgContext_NamesA; | |
| 410 | |
| 411 #ifdef UNICODE | |
| 412 #define SecPkgContext_Names SecPkgContext_NamesW | |
| 413 #define PSecPkgContext_Names PSecPkgContext_NamesW | |
| 414 #else | |
| 415 #define SecPkgContext_Names SecPkgContext_NamesA | |
| 416 #define PSecPkgContext_Names PSecPkgContext_NamesA | |
| 417 #endif | |
| 418 | |
| 419 typedef struct _SecPkgContext_Lifespan { | |
| 420 TimeStamp tsStart; | |
| 421 TimeStamp tsExpiry; | |
| 422 } SecPkgContext_Lifespan,*PSecPkgContext_Lifespan; | |
| 423 | |
| 424 typedef struct _SecPkgContext_DceInfo { | |
| 425 unsigned long AuthzSvc; | |
| 426 void *pPac; | |
| 427 } SecPkgContext_DceInfo,*PSecPkgContext_DceInfo; | |
| 428 | |
| 429 typedef struct _SecPkgContext_KeyInfoA { | |
| 430 SEC_CHAR *sSignatureAlgorithmName; | |
| 431 SEC_CHAR *sEncryptAlgorithmName; | |
| 432 unsigned long KeySize; | |
| 433 unsigned long SignatureAlgorithm; | |
| 434 unsigned long EncryptAlgorithm; | |
| 435 } SecPkgContext_KeyInfoA,*PSecPkgContext_KeyInfoA; | |
| 436 | |
| 437 typedef struct _SecPkgContext_KeyInfoW { | |
| 438 SEC_WCHAR *sSignatureAlgorithmName; | |
| 439 SEC_WCHAR *sEncryptAlgorithmName; | |
| 440 unsigned long KeySize; | |
| 441 unsigned long SignatureAlgorithm; | |
| 442 unsigned long EncryptAlgorithm; | |
| 443 } SecPkgContext_KeyInfoW,*PSecPkgContext_KeyInfoW; | |
| 444 | |
| 445 #ifdef UNICODE | |
| 446 #define SecPkgContext_KeyInfo SecPkgContext_KeyInfoW | |
| 447 #define PSecPkgContext_KeyInfo PSecPkgContext_KeyInfoW | |
| 448 #else | |
| 449 #define SecPkgContext_KeyInfo SecPkgContext_KeyInfoA | |
| 450 #define PSecPkgContext_KeyInfo PSecPkgContext_KeyInfoA | |
| 451 #endif | |
| 452 | |
| 453 typedef struct _SecPkgContext_AuthorityA { | |
| 454 SEC_CHAR *sAuthorityName; | |
| 455 } SecPkgContext_AuthorityA,*PSecPkgContext_AuthorityA; | |
| 456 | |
| 457 typedef struct _SecPkgContext_AuthorityW { | |
| 458 SEC_WCHAR *sAuthorityName; | |
| 459 } SecPkgContext_AuthorityW,*PSecPkgContext_AuthorityW; | |
| 460 | |
| 461 #ifdef UNICODE | |
| 462 #define SecPkgContext_Authority SecPkgContext_AuthorityW | |
| 463 #define PSecPkgContext_Authority PSecPkgContext_AuthorityW | |
| 464 #else | |
| 465 #define SecPkgContext_Authority SecPkgContext_AuthorityA | |
| 466 #define PSecPkgContext_Authority PSecPkgContext_AuthorityA | |
| 467 #endif | |
| 468 | |
| 469 typedef struct _SecPkgContext_ProtoInfoA { | |
| 470 SEC_CHAR *sProtocolName; | |
| 471 unsigned long majorVersion; | |
| 472 unsigned long minorVersion; | |
| 473 } SecPkgContext_ProtoInfoA,*PSecPkgContext_ProtoInfoA; | |
| 474 | |
| 475 typedef struct _SecPkgContext_ProtoInfoW { | |
| 476 SEC_WCHAR *sProtocolName; | |
| 477 unsigned long majorVersion; | |
| 478 unsigned long minorVersion; | |
| 479 } SecPkgContext_ProtoInfoW,*PSecPkgContext_ProtoInfoW; | |
| 480 | |
| 481 #ifdef UNICODE | |
| 482 #define SecPkgContext_ProtoInfo SecPkgContext_ProtoInfoW | |
| 483 #define PSecPkgContext_ProtoInfo PSecPkgContext_ProtoInfoW | |
| 484 #else | |
| 485 #define SecPkgContext_ProtoInfo SecPkgContext_ProtoInfoA | |
| 486 #define PSecPkgContext_ProtoInfo PSecPkgContext_ProtoInfoA | |
| 487 #endif | |
| 488 | |
| 489 typedef struct _SecPkgContext_PasswordExpiry { | |
| 490 TimeStamp tsPasswordExpires; | |
| 491 } SecPkgContext_PasswordExpiry,*PSecPkgContext_PasswordExpiry; | |
| 492 | |
| 493 typedef struct _SecPkgContext_LogoffTime { | |
| 494 TimeStamp tsLogoffTime; | |
| 495 } SecPkgContext_LogoffTime,*PSecPkgContext_LogoffTime; | |
| 496 | |
| 497 typedef struct _SecPkgContext_SessionKey { | |
| 498 unsigned long SessionKeyLength; | |
| 499 unsigned char *SessionKey; | |
| 500 } SecPkgContext_SessionKey,*PSecPkgContext_SessionKey; | |
| 501 | |
| 502 typedef struct _SecPkgContext_PackageInfoW { | |
| 503 PSecPkgInfoW PackageInfo; | |
| 504 } SecPkgContext_PackageInfoW,*PSecPkgContext_PackageInfoW; | |
| 505 | |
| 506 typedef struct _SecPkgContext_PackageInfoA { | |
| 507 PSecPkgInfoA PackageInfo; | |
| 508 } SecPkgContext_PackageInfoA,*PSecPkgContext_PackageInfoA; | |
| 509 | |
| 510 typedef struct _SecPkgContext_UserFlags { | |
| 511 unsigned long UserFlags; | |
| 512 } SecPkgContext_UserFlags,*PSecPkgContext_UserFlags; | |
| 513 | |
| 514 typedef struct _SecPkgContext_Flags { | |
| 515 unsigned long Flags; | |
| 516 } SecPkgContext_Flags,*PSecPkgContext_Flags; | |
| 517 | |
| 518 #ifdef UNICODE | |
| 519 #define SecPkgContext_PackageInfo SecPkgContext_PackageInfoW | |
| 520 #define PSecPkgContext_PackageInfo PSecPkgContext_PackageInfoW | |
| 521 #else | |
| 522 #define SecPkgContext_PackageInfo SecPkgContext_PackageInfoA | |
| 523 #define PSecPkgContext_PackageInfo PSecPkgContext_PackageInfoA | |
| 524 #endif | |
| 525 | |
| 526 typedef struct _SecPkgContext_NegotiationInfoA { | |
| 527 PSecPkgInfoA PackageInfo; | |
| 528 unsigned long NegotiationState; | |
| 529 } SecPkgContext_NegotiationInfoA,*PSecPkgContext_NegotiationInfoA; | |
| 530 | |
| 531 typedef struct _SecPkgContext_NegotiationInfoW { | |
| 532 PSecPkgInfoW PackageInfo; | |
| 533 unsigned long NegotiationState; | |
| 534 } SecPkgContext_NegotiationInfoW,*PSecPkgContext_NegotiationInfoW; | |
| 535 | |
| 536 #ifdef UNICODE | |
| 537 #define SecPkgContext_NegotiationInfo SecPkgContext_NegotiationInfoW | |
| 538 #define PSecPkgContext_NegotiationInfo PSecPkgContext_NegotiationInfoW | |
| 539 #else | |
| 540 #define SecPkgContext_NegotiationInfo SecPkgContext_NegotiationInfoA | |
| 541 #define PSecPkgContext_NegotiationInfo PSecPkgContext_NegotiationInfoA | |
| 542 #endif | |
| 543 | |
| 544 #define SECPKG_NEGOTIATION_COMPLETE 0 | |
| 545 #define SECPKG_NEGOTIATION_OPTIMISTIC 1 | |
| 546 #define SECPKG_NEGOTIATION_IN_PROGRESS 2 | |
| 547 #define SECPKG_NEGOTIATION_DIRECT 3 | |
| 548 #define SECPKG_NEGOTIATION_TRY_MULTICRED 4 | |
| 549 | |
| 550 typedef struct _SecPkgContext_NativeNamesW { | |
| 551 SEC_WCHAR *sClientName; | |
| 552 SEC_WCHAR *sServerName; | |
| 553 } SecPkgContext_NativeNamesW,*PSecPkgContext_NativeNamesW; | |
| 554 | |
| 555 typedef struct _SecPkgContext_NativeNamesA { | |
| 556 SEC_CHAR *sClientName; | |
| 557 SEC_CHAR *sServerName; | |
| 558 } SecPkgContext_NativeNamesA,*PSecPkgContext_NativeNamesA; | |
| 559 | |
| 560 #ifdef UNICODE | |
| 561 #define SecPkgContext_NativeNames SecPkgContext_NativeNamesW | |
| 562 #define PSecPkgContext_NativeNames PSecPkgContext_NativeNamesW | |
| 563 #else | |
| 564 #define SecPkgContext_NativeNames SecPkgContext_NativeNamesA | |
| 565 #define PSecPkgContext_NativeNames PSecPkgContext_NativeNamesA | |
| 566 #endif | |
| 567 | |
| 568 typedef struct _SecPkgContext_CredentialNameW { | |
| 569 unsigned long CredentialType; | |
| 570 SEC_WCHAR *sCredentialName; | |
| 571 } SecPkgContext_CredentialNameW,*PSecPkgContext_CredentialNameW; | |
| 572 | |
| 573 typedef struct _SecPkgContext_CredentialNameA { | |
| 574 unsigned long CredentialType; | |
| 575 SEC_CHAR *sCredentialName; | |
| 576 } SecPkgContext_CredentialNameA,*PSecPkgContext_CredentialNameA; | |
| 577 | |
| 578 #ifdef UNICODE | |
| 579 #define SecPkgContext_CredentialName SecPkgContext_CredentialNameW | |
| 580 #define PSecPkgContext_CredentialName PSecPkgContext_CredentialNameW | |
| 581 #else | |
| 582 #define SecPkgContext_CredentialName SecPkgContext_CredentialNameA | |
| 583 #define PSecPkgContext_CredentialName PSecPkgContext_CredentialNameA | |
| 584 #endif | |
| 585 | |
| 586 typedef struct _SecPkgContext_AccessToken { | |
| 587 void *AccessToken; | |
| 588 } SecPkgContext_AccessToken,*PSecPkgContext_AccessToken; | |
| 589 | |
| 590 typedef struct _SecPkgContext_TargetInformation { | |
| 591 unsigned long MarshalledTargetInfoLength; | |
| 592 unsigned char *MarshalledTargetInfo; | |
| 593 } SecPkgContext_TargetInformation,*PSecPkgContext_TargetInformation; | |
| 594 | |
| 595 typedef struct _SecPkgContext_AuthzID { | |
| 596 unsigned long AuthzIDLength; | |
| 597 char *AuthzID; | |
| 598 } SecPkgContext_AuthzID,*PSecPkgContext_AuthzID; | |
| 599 | |
| 600 typedef struct _SecPkgContext_Target { | |
| 601 unsigned long TargetLength; | |
| 602 char *Target; | |
| 603 } SecPkgContext_Target,*PSecPkgContext_Target; | |
| 604 | |
| 605 typedef void (WINAPI *SEC_GET_KEY_FN) (void *Arg,void *Principal,unsigned long KeyVer,void **Key,SECURITY_STATUS *Status); | |
| 606 | |
| 607 #define SECPKG_CONTEXT_EXPORT_RESET_NEW 0x00000001 | |
| 608 #define SECPKG_CONTEXT_EXPORT_DELETE_OLD 0x00000002 | |
| 609 #define SECPKG_CONTEXT_EXPORT_TO_KERNEL 0x00000004 | |
| 610 | |
| 611 KSECDDDECLSPEC SECURITY_STATUS WINAPI AcquireCredentialsHandleW( | |
| 612 #if ISSP_MODE==0 | |
| 613 PSECURITY_STRING pPrincipal,PSECURITY_STRING pPackage, | |
| 614 #else | |
| 615 SEC_WCHAR *pszPrincipal,SEC_WCHAR *pszPackage, | |
| 616 #endif | |
| 617 unsigned long fCredentialUse,void *pvLogonId,void *pAuthData,SEC_GET_KEY_FN pGetKeyFn,void *pvGetKeyArgument,PCredHandle phCredential,PTimeStamp ptsExpiry); | |
| 618 | |
| 619 typedef SECURITY_STATUS (WINAPI *ACQUIRE_CREDENTIALS_HANDLE_FN_W)( | |
| 620 #if ISSP_MODE==0 | |
| 621 PSECURITY_STRING,PSECURITY_STRING, | |
| 622 #else | |
| 623 SEC_WCHAR *,SEC_WCHAR *, | |
| 624 #endif | |
| 625 unsigned long,void *,void *,SEC_GET_KEY_FN,void *,PCredHandle,PTimeStamp); | |
| 626 | |
| 627 SECURITY_STATUS WINAPI AcquireCredentialsHandleA(SEC_CHAR *pszPrincipal,SEC_CHAR *pszPackage,unsigned long fCredentialUse,void *pvLogonId,void *pAuthData,SEC_GET_KEY_FN pGetKeyFn,void *pvGetKeyArgument,PCredHandle phCredential,PTimeStamp ptsExpiry); | |
| 628 | |
| 629 typedef SECURITY_STATUS (WINAPI *ACQUIRE_CREDENTIALS_HANDLE_FN_A)(SEC_CHAR *,SEC_CHAR *,unsigned long,void *,void *,SEC_GET_KEY_FN,void *,PCredHandle,PTimeStamp); | |
| 630 | |
| 631 #ifdef UNICODE | |
| 632 #define AcquireCredentialsHandle AcquireCredentialsHandleW | |
| 633 #define ACQUIRE_CREDENTIALS_HANDLE_FN ACQUIRE_CREDENTIALS_HANDLE_FN_W | |
| 634 #else | |
| 635 #define AcquireCredentialsHandle AcquireCredentialsHandleA | |
| 636 #define ACQUIRE_CREDENTIALS_HANDLE_FN ACQUIRE_CREDENTIALS_HANDLE_FN_A | |
| 637 #endif | |
| 638 | |
| 639 KSECDDDECLSPEC SECURITY_STATUS WINAPI FreeCredentialsHandle(PCredHandle phCredential); | |
| 640 | |
| 641 typedef SECURITY_STATUS (WINAPI *FREE_CREDENTIALS_HANDLE_FN)(PCredHandle); | |
| 642 | |
| 643 KSECDDDECLSPEC SECURITY_STATUS WINAPI AddCredentialsW(PCredHandle hCredentials, | |
| 644 #if ISSP_MODE==0 | |
| 645 PSECURITY_STRING pPrincipal,PSECURITY_STRING pPackage, | |
| 646 #else | |
| 647 SEC_WCHAR *pszPrincipal,SEC_WCHAR *pszPackage, | |
| 648 #endif | |
| 649 unsigned long fCredentialUse,void *pAuthData,SEC_GET_KEY_FN pGetKeyFn,void *pvGetKeyArgument,PTimeStamp ptsExpiry); | |
| 650 | |
| 651 typedef SECURITY_STATUS (WINAPI *ADD_CREDENTIALS_FN_W)(PCredHandle, | |
| 652 #if ISSP_MODE==0 | |
| 653 PSECURITY_STRING,PSECURITY_STRING, | |
| 654 #else | |
| 655 SEC_WCHAR *,SEC_WCHAR *, | |
| 656 #endif | |
| 657 unsigned long,void *,SEC_GET_KEY_FN,void *,PTimeStamp); | |
| 658 | |
| 659 SECURITY_STATUS WINAPI AddCredentialsA(PCredHandle hCredentials,SEC_CHAR *pszPrincipal,SEC_CHAR *pszPackage,unsigned long fCredentialUse,void *pAuthData,SEC_GET_KEY_FN pGetKeyFn,void *pvGetKeyArgument,PTimeStamp ptsExpiry); | |
| 660 | |
| 661 typedef SECURITY_STATUS (WINAPI *ADD_CREDENTIALS_FN_A)(PCredHandle,SEC_CHAR *,SEC_CHAR *,unsigned long,void *,SEC_GET_KEY_FN,void *,PTimeStamp); | |
| 662 | |
| 663 #ifdef UNICODE | |
| 664 #define AddCredentials AddCredentialsW | |
| 665 #define ADD_CREDENTIALS_FN ADD_CREDENTIALS_FN_W | |
| 666 #else | |
| 667 #define AddCredentials AddCredentialsA | |
| 668 #define ADD_CREDENTIALS_FN ADD_CREDENTIALS_FN_A | |
| 669 #endif | |
| 670 | |
| 671 KSECDDDECLSPEC SECURITY_STATUS WINAPI InitializeSecurityContextW(PCredHandle phCredential,PCtxtHandle phContext, | |
| 672 #if ISSP_MODE==0 | |
| 673 PSECURITY_STRING pTargetName, | |
| 674 #else | |
| 675 SEC_WCHAR *pszTargetName, | |
| 676 #endif | |
| 677 unsigned long fContextReq,unsigned long Reserved1,unsigned long TargetDataRep,PSecBufferDesc pInput,unsigned long Reserved2,PCtxtHandle phNewContext,PSecBufferDesc pOutput,unsigned long *pfContextAttr,PTimeStamp ptsExpiry); | |
| 678 | |
| 679 typedef SECURITY_STATUS (WINAPI *INITIALIZE_SECURITY_CONTEXT_FN_W)(PCredHandle,PCtxtHandle, | |
| 680 #if ISSP_MODE==0 | |
| 681 PSECURITY_STRING, | |
| 682 #else | |
| 683 SEC_WCHAR *, | |
| 684 #endif | |
| 685 unsigned long,unsigned long,unsigned long,PSecBufferDesc,unsigned long,PCtxtHandle,PSecBufferDesc,unsigned long *,PTimeStamp); | |
| 686 | |
| 687 SECURITY_STATUS WINAPI InitializeSecurityContextA(PCredHandle phCredential,PCtxtHandle phContext,SEC_CHAR *pszTargetName,unsigned long fContextReq,unsigned long Reserved1,unsigned long TargetDataRep,PSecBufferDesc pInput,unsigned long Reserved2,PCtxtHandle phNewContext,PSecBufferDesc pOutput,unsigned long *pfContextAttr,PTimeStamp ptsExpiry); | |
| 688 | |
| 689 typedef SECURITY_STATUS (WINAPI *INITIALIZE_SECURITY_CONTEXT_FN_A)(PCredHandle,PCtxtHandle,SEC_CHAR *,unsigned long,unsigned long,unsigned long,PSecBufferDesc,unsigned long,PCtxtHandle,PSecBufferDesc,unsigned long *,PTimeStamp); | |
| 690 | |
| 691 #ifdef UNICODE | |
| 692 #define InitializeSecurityContext InitializeSecurityContextW | |
| 693 #define INITIALIZE_SECURITY_CONTEXT_FN INITIALIZE_SECURITY_CONTEXT_FN_W | |
| 694 #else | |
| 695 #define InitializeSecurityContext InitializeSecurityContextA | |
| 696 #define INITIALIZE_SECURITY_CONTEXT_FN INITIALIZE_SECURITY_CONTEXT_FN_A | |
| 697 #endif | |
| 698 | |
| 699 KSECDDDECLSPEC SECURITY_STATUS WINAPI AcceptSecurityContext(PCredHandle phCredential,PCtxtHandle phContext,PSecBufferDesc pInput,unsigned long fContextReq,unsigned long TargetDataRep,PCtxtHandle phNewContext,PSecBufferDesc pOutput,unsigned long *pfContextAttr,PTimeStamp ptsExpiry); | |
| 700 | |
| 701 typedef SECURITY_STATUS (WINAPI *ACCEPT_SECURITY_CONTEXT_FN)(PCredHandle,PCtxtHandle,PSecBufferDesc,unsigned long,unsigned long,PCtxtHandle,PSecBufferDesc,unsigned long *,PTimeStamp); | |
| 702 | |
| 703 SECURITY_STATUS WINAPI CompleteAuthToken(PCtxtHandle phContext,PSecBufferDesc pToken); | |
| 704 | |
| 705 typedef SECURITY_STATUS (WINAPI *COMPLETE_AUTH_TOKEN_FN)(PCtxtHandle,PSecBufferDesc); | |
| 706 | |
| 707 KSECDDDECLSPEC SECURITY_STATUS WINAPI ImpersonateSecurityContext(PCtxtHandle phContext); | |
| 708 | |
| 709 typedef SECURITY_STATUS (WINAPI *IMPERSONATE_SECURITY_CONTEXT_FN)(PCtxtHandle); | |
| 710 | |
| 711 KSECDDDECLSPEC SECURITY_STATUS WINAPI RevertSecurityContext(PCtxtHandle phContext); | |
| 712 | |
| 713 typedef SECURITY_STATUS (WINAPI *REVERT_SECURITY_CONTEXT_FN)(PCtxtHandle); | |
| 714 | |
| 715 KSECDDDECLSPEC SECURITY_STATUS WINAPI QuerySecurityContextToken(PCtxtHandle phContext,void **Token); | |
| 716 | |
| 717 typedef SECURITY_STATUS (WINAPI *QUERY_SECURITY_CONTEXT_TOKEN_FN)(PCtxtHandle,void **); | |
| 718 | |
| 719 KSECDDDECLSPEC SECURITY_STATUS WINAPI DeleteSecurityContext(PCtxtHandle phContext); | |
| 720 | |
| 721 typedef SECURITY_STATUS (WINAPI *DELETE_SECURITY_CONTEXT_FN)(PCtxtHandle); | |
| 722 | |
| 723 KSECDDDECLSPEC SECURITY_STATUS WINAPI ApplyControlToken(PCtxtHandle phContext,PSecBufferDesc pInput); | |
| 724 | |
| 725 typedef SECURITY_STATUS (WINAPI *APPLY_CONTROL_TOKEN_FN)(PCtxtHandle,PSecBufferDesc); | |
| 726 | |
| 727 KSECDDDECLSPEC SECURITY_STATUS WINAPI QueryContextAttributesW(PCtxtHandle phContext,unsigned long ulAttribute,void *pBuffer); | |
| 728 | |
| 729 typedef SECURITY_STATUS (WINAPI *QUERY_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,unsigned long,void *); | |
| 730 | |
| 731 SECURITY_STATUS WINAPI QueryContextAttributesA(PCtxtHandle phContext,unsigned long ulAttribute,void *pBuffer); | |
| 732 | |
| 733 typedef SECURITY_STATUS (WINAPI *QUERY_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,unsigned long,void *); | |
| 734 | |
| 735 #ifdef UNICODE | |
| 736 #define QueryContextAttributes QueryContextAttributesW | |
| 737 #define QUERY_CONTEXT_ATTRIBUTES_FN QUERY_CONTEXT_ATTRIBUTES_FN_W | |
| 738 #else | |
| 739 #define QueryContextAttributes QueryContextAttributesA | |
| 740 #define QUERY_CONTEXT_ATTRIBUTES_FN QUERY_CONTEXT_ATTRIBUTES_FN_A | |
| 741 #endif | |
| 742 | |
| 743 SECURITY_STATUS WINAPI SetContextAttributesW(PCtxtHandle phContext,unsigned long ulAttribute,void *pBuffer,unsigned long cbBuffer); | |
| 744 | |
| 745 typedef SECURITY_STATUS (WINAPI *SET_CONTEXT_ATTRIBUTES_FN_W)(PCtxtHandle,unsigned long,void *,unsigned long); | |
| 746 | |
| 747 SECURITY_STATUS WINAPI SetContextAttributesA(PCtxtHandle phContext,unsigned long ulAttribute,void *pBuffer,unsigned long cbBuffer); | |
| 748 | |
| 749 typedef SECURITY_STATUS (WINAPI *SET_CONTEXT_ATTRIBUTES_FN_A)(PCtxtHandle,unsigned long,void *,unsigned long); | |
| 750 | |
| 751 #ifdef UNICODE | |
| 752 #define SetContextAttributes SetContextAttributesW | |
| 753 #define SET_CONTEXT_ATTRIBUTES_FN SET_CONTEXT_ATTRIBUTES_FN_W | |
| 754 #else | |
| 755 #define SetContextAttributes SetContextAttributesA | |
| 756 #define SET_CONTEXT_ATTRIBUTES_FN SET_CONTEXT_ATTRIBUTES_FN_A | |
| 757 #endif | |
| 758 | |
| 759 KSECDDDECLSPEC SECURITY_STATUS WINAPI QueryCredentialsAttributesW(PCredHandle phCredential,unsigned long ulAttribute,void *pBuffer); | |
| 760 | |
| 761 typedef SECURITY_STATUS (WINAPI *QUERY_CREDENTIALS_ATTRIBUTES_FN_W)(PCredHandle,unsigned long,void *); | |
| 762 | |
| 763 SECURITY_STATUS WINAPI QueryCredentialsAttributesA(PCredHandle phCredential,unsigned long ulAttribute,void *pBuffer); | |
| 764 | |
| 765 typedef SECURITY_STATUS (WINAPI *QUERY_CREDENTIALS_ATTRIBUTES_FN_A)(PCredHandle,unsigned long,void *); | |
| 766 | |
| 767 #ifdef UNICODE | |
| 768 #define QueryCredentialsAttributes QueryCredentialsAttributesW | |
| 769 #define QUERY_CREDENTIALS_ATTRIBUTES_FN QUERY_CREDENTIALS_ATTRIBUTES_FN_W | |
| 770 #else | |
| 771 #define QueryCredentialsAttributes QueryCredentialsAttributesA | |
| 772 #define QUERY_CREDENTIALS_ATTRIBUTES_FN QUERY_CREDENTIALS_ATTRIBUTES_FN_A | |
| 773 #endif | |
| 774 | |
| 775 KSECDDDECLSPEC SECURITY_STATUS WINAPI SetCredentialsAttributesW(PCredHandle phCredential,unsigned long ulAttribute,void *pBuffer,unsigned long cbBuffer); | |
| 776 | |
| 777 typedef SECURITY_STATUS (WINAPI *SET_CREDENTIALS_ATTRIBUTES_FN_W)(PCredHandle,unsigned long,void *,unsigned long); | |
| 778 | |
| 779 SECURITY_STATUS WINAPI SetCredentialsAttributesA(PCredHandle phCredential,unsigned long ulAttribute,void *pBuffer,unsigned long cbBuffer); | |
| 780 | |
| 781 typedef SECURITY_STATUS (WINAPI *SET_CREDENTIALS_ATTRIBUTES_FN_A)(PCredHandle,unsigned long,void *,unsigned long); | |
| 782 | |
| 783 #ifdef UNICODE | |
| 784 #define SetCredentialsAttributes SetCredentialsAttributesW | |
| 785 #define SET_CREDENTIALS_ATTRIBUTES_FN SET_CREDENTIALS_ATTRIBUTES_FN_W | |
| 786 #else | |
| 787 #define SetCredentialsAttributes SetCredentialsAttributesA | |
| 788 #define SET_CREDENTIALS_ATTRIBUTES_FN SET_CREDENTIALS_ATTRIBUTES_FN_A | |
| 789 #endif | |
| 790 | |
| 791 SECURITY_STATUS WINAPI FreeContextBuffer(void *pvContextBuffer); | |
| 792 | |
| 793 typedef SECURITY_STATUS (WINAPI *FREE_CONTEXT_BUFFER_FN)(void *); | |
| 794 | |
| 795 KSECDDDECLSPEC SECURITY_STATUS WINAPI MakeSignature(PCtxtHandle phContext,unsigned long fQOP,PSecBufferDesc pMessage,unsigned long MessageSeqNo); | |
| 796 | |
| 797 typedef SECURITY_STATUS (WINAPI *MAKE_SIGNATURE_FN)(PCtxtHandle,unsigned long,PSecBufferDesc,unsigned long); | |
| 798 | |
| 799 KSECDDDECLSPEC SECURITY_STATUS WINAPI VerifySignature(PCtxtHandle phContext,PSecBufferDesc pMessage,unsigned long MessageSeqNo,unsigned long *pfQOP); | |
| 800 | |
| 801 typedef SECURITY_STATUS (WINAPI *VERIFY_SIGNATURE_FN)(PCtxtHandle,PSecBufferDesc,unsigned long,unsigned long *); | |
| 802 | |
| 803 #define SECQOP_WRAP_NO_ENCRYPT 0x80000001 | |
| 804 #define SECQOP_WRAP_OOB_DATA 0x40000000 | |
| 805 | |
| 806 SECURITY_STATUS WINAPI EncryptMessage(PCtxtHandle phContext,unsigned long fQOP,PSecBufferDesc pMessage,unsigned long MessageSeqNo); | |
| 807 | |
| 808 typedef SECURITY_STATUS (WINAPI *ENCRYPT_MESSAGE_FN)(PCtxtHandle,unsigned long,PSecBufferDesc,unsigned long); | |
| 809 | |
| 810 SECURITY_STATUS WINAPI DecryptMessage(PCtxtHandle phContext,PSecBufferDesc pMessage,unsigned long MessageSeqNo,unsigned long *pfQOP); | |
| 811 | |
| 812 typedef SECURITY_STATUS (WINAPI *DECRYPT_MESSAGE_FN)(PCtxtHandle,PSecBufferDesc,unsigned long,unsigned long *); | |
| 813 | |
| 814 KSECDDDECLSPEC SECURITY_STATUS WINAPI EnumerateSecurityPackagesW(unsigned long *pcPackages,PSecPkgInfoW *ppPackageInfo); | |
| 815 | |
| 816 typedef SECURITY_STATUS (WINAPI *ENUMERATE_SECURITY_PACKAGES_FN_W)(unsigned long *,PSecPkgInfoW *); | |
| 817 | |
| 818 SECURITY_STATUS WINAPI EnumerateSecurityPackagesA(unsigned long *pcPackages,PSecPkgInfoA *ppPackageInfo); | |
| 819 | |
| 820 typedef SECURITY_STATUS (WINAPI *ENUMERATE_SECURITY_PACKAGES_FN_A)(unsigned long *,PSecPkgInfoA *); | |
| 821 | |
| 822 #ifdef UNICODE | |
| 823 #define EnumerateSecurityPackages EnumerateSecurityPackagesW | |
| 824 #define ENUMERATE_SECURITY_PACKAGES_FN ENUMERATE_SECURITY_PACKAGES_FN_W | |
| 825 #else | |
| 826 #define EnumerateSecurityPackages EnumerateSecurityPackagesA | |
| 827 #define ENUMERATE_SECURITY_PACKAGES_FN ENUMERATE_SECURITY_PACKAGES_FN_A | |
| 828 #endif | |
| 829 | |
| 830 KSECDDDECLSPEC SECURITY_STATUS WINAPI QuerySecurityPackageInfoW( | |
| 831 #if ISSP_MODE==0 | |
| 832 PSECURITY_STRING pPackageName, | |
| 833 #else | |
| 834 SEC_WCHAR *pszPackageName, | |
| 835 #endif | |
| 836 PSecPkgInfoW *ppPackageInfo); | |
| 837 | |
| 838 typedef SECURITY_STATUS (WINAPI *QUERY_SECURITY_PACKAGE_INFO_FN_W)( | |
| 839 #if ISSP_MODE==0 | |
| 840 PSECURITY_STRING, | |
| 841 #else | |
| 842 SEC_WCHAR *, | |
| 843 #endif | |
| 844 PSecPkgInfoW *); | |
| 845 | |
| 846 SECURITY_STATUS WINAPI QuerySecurityPackageInfoA(SEC_CHAR *pszPackageName,PSecPkgInfoA *ppPackageInfo); | |
| 847 | |
| 848 typedef SECURITY_STATUS (WINAPI *QUERY_SECURITY_PACKAGE_INFO_FN_A)(SEC_CHAR *,PSecPkgInfoA *); | |
| 849 | |
| 850 #ifdef UNICODE | |
| 851 #define QuerySecurityPackageInfo QuerySecurityPackageInfoW | |
| 852 #define QUERY_SECURITY_PACKAGE_INFO_FN QUERY_SECURITY_PACKAGE_INFO_FN_W | |
| 853 #else | |
| 854 #define QuerySecurityPackageInfo QuerySecurityPackageInfoA | |
| 855 #define QUERY_SECURITY_PACKAGE_INFO_FN QUERY_SECURITY_PACKAGE_INFO_FN_A | |
| 856 #endif | |
| 857 | |
| 858 typedef enum _SecDelegationType { | |
| 859 SecFull,SecService,SecTree,SecDirectory,SecObject | |
| 860 } SecDelegationType,*PSecDelegationType; | |
| 861 | |
| 862 SECURITY_STATUS WINAPI DelegateSecurityContext(PCtxtHandle phContext, | |
| 863 #if ISSP_MODE==0 | |
| 864 PSECURITY_STRING pTarget, | |
| 865 #else | |
| 866 SEC_CHAR *pszTarget, | |
| 867 #endif | |
| 868 SecDelegationType DelegationType,PTimeStamp pExpiry,PSecBuffer pPackageParameters,PSecBufferDesc pOutput); | |
| 869 | |
| 870 KSECDDDECLSPEC SECURITY_STATUS WINAPI ExportSecurityContext(PCtxtHandle phContext,ULONG fFlags,PSecBuffer pPackedContext,void **pToken); | |
| 871 | |
| 872 typedef SECURITY_STATUS (WINAPI *EXPORT_SECURITY_CONTEXT_FN)(PCtxtHandle,ULONG,PSecBuffer,void **); | |
| 873 | |
| 874 KSECDDDECLSPEC SECURITY_STATUS WINAPI ImportSecurityContextW( | |
| 875 #if ISSP_MODE==0 | |
| 876 PSECURITY_STRING pszPackage, | |
| 877 #else | |
| 878 SEC_WCHAR *pszPackage, | |
| 879 #endif | |
| 880 PSecBuffer pPackedContext,void *Token,PCtxtHandle phContext); | |
| 881 | |
| 882 typedef SECURITY_STATUS (WINAPI *IMPORT_SECURITY_CONTEXT_FN_W)( | |
| 883 #if ISSP_MODE==0 | |
| 884 PSECURITY_STRING, | |
| 885 #else | |
| 886 SEC_WCHAR *, | |
| 887 #endif | |
| 888 PSecBuffer,VOID *,PCtxtHandle); | |
| 889 | |
| 890 SECURITY_STATUS WINAPI ImportSecurityContextA(SEC_CHAR *pszPackage,PSecBuffer pPackedContext,VOID *Token,PCtxtHandle phContext); | |
| 891 | |
| 892 typedef SECURITY_STATUS (WINAPI *IMPORT_SECURITY_CONTEXT_FN_A)(SEC_CHAR *,PSecBuffer,void *,PCtxtHandle); | |
| 893 | |
| 894 #ifdef UNICODE | |
| 895 #define ImportSecurityContext ImportSecurityContextW | |
| 896 #define IMPORT_SECURITY_CONTEXT_FN IMPORT_SECURITY_CONTEXT_FN_W | |
| 897 #else | |
| 898 #define ImportSecurityContext ImportSecurityContextA | |
| 899 #define IMPORT_SECURITY_CONTEXT_FN IMPORT_SECURITY_CONTEXT_FN_A | |
| 900 #endif | |
| 901 | |
| 902 #if ISSP_MODE==0 | |
| 903 KSECDDDECLSPEC NTSTATUS NTAPI SecMakeSPN(PUNICODE_STRING ServiceClass,PUNICODE_STRING ServiceName,PUNICODE_STRING InstanceName,USHORT InstancePort,PUNICODE_STRING Referrer,PUNICODE_STRING Spn,PULONG Length,BOOLEAN Allocate); | |
| 904 KSECDDDECLSPEC NTSTATUS NTAPI SecMakeSPNEx(PUNICODE_STRING ServiceClass,PUNICODE_STRING ServiceName,PUNICODE_STRING InstanceName,USHORT InstancePort,PUNICODE_STRING Referrer,PUNICODE_STRING TargetInfo,PUNICODE_STRING Spn,PULONG Length,BOOLEAN Allocate); | |
| 905 KSECDDDECLSPEC NTSTATUS WINAPI SecLookupAccountSid(PSID Sid,PULONG NameSize,PUNICODE_STRING NameBuffer,PULONG DomainSize,PUNICODE_STRING DomainBuffer,PSID_NAME_USE NameUse); | |
| 906 KSECDDDECLSPEC NTSTATUS WINAPI SecLookupAccountName(PUNICODE_STRING Name,PULONG SidSize,PSID Sid,PSID_NAME_USE NameUse,PULONG DomainSize,PUNICODE_STRING ReferencedDomain); | |
| 907 KSECDDDECLSPEC NTSTATUS WINAPI SecLookupWellKnownSid(WELL_KNOWN_SID_TYPE SidType,PSID Sid,ULONG SidBufferSize,PULONG SidSize); | |
| 908 #endif | |
| 909 | |
| 910 #define SECURITY_ENTRYPOINT_ANSIW "InitSecurityInterfaceW" | |
| 911 #define SECURITY_ENTRYPOINT_ANSIA "InitSecurityInterfaceA" | |
| 912 #define SECURITY_ENTRYPOINTW SEC_TEXT("InitSecurityInterfaceW") | |
| 913 #define SECURITY_ENTRYPOINTA SEC_TEXT("InitSecurityInterfaceA") | |
| 914 #define SECURITY_ENTRYPOINT16 "INITSECURITYINTERFACEA" | |
| 915 | |
| 916 #ifdef SECURITY_WIN32 | |
| 917 #ifdef UNICODE | |
| 918 #define SECURITY_ENTRYPOINT SECURITY_ENTRYPOINTW | |
| 919 #define SECURITY_ENTRYPOINT_ANSI SECURITY_ENTRYPOINT_ANSIW | |
| 920 #else | |
| 921 #define SECURITY_ENTRYPOINT SECURITY_ENTRYPOINTA | |
| 922 #define SECURITY_ENTRYPOINT_ANSI SECURITY_ENTRYPOINT_ANSIA | |
| 923 #endif | |
| 924 #else | |
| 925 #define SECURITY_ENTRYPOINT SECURITY_ENTRYPOINT16 | |
| 926 #define SECURITY_ENTRYPOINT_ANSI SECURITY_ENTRYPOINT16 | |
| 927 #endif | |
| 928 | |
| 929 #define FreeCredentialHandle FreeCredentialsHandle | |
| 930 | |
| 931 typedef struct _SECURITY_FUNCTION_TABLE_W { | |
| 932 unsigned long dwVersion; | |
| 933 ENUMERATE_SECURITY_PACKAGES_FN_W EnumerateSecurityPackagesW; | |
| 934 QUERY_CREDENTIALS_ATTRIBUTES_FN_W QueryCredentialsAttributesW; | |
| 935 ACQUIRE_CREDENTIALS_HANDLE_FN_W AcquireCredentialsHandleW; | |
| 936 FREE_CREDENTIALS_HANDLE_FN FreeCredentialsHandle; | |
| 937 void *Reserved2; | |
| 938 INITIALIZE_SECURITY_CONTEXT_FN_W InitializeSecurityContextW; | |
| 939 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext; | |
| 940 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken; | |
| 941 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext; | |
| 942 APPLY_CONTROL_TOKEN_FN ApplyControlToken; | |
| 943 QUERY_CONTEXT_ATTRIBUTES_FN_W QueryContextAttributesW; | |
| 944 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext; | |
| 945 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext; | |
| 946 MAKE_SIGNATURE_FN MakeSignature; | |
| 947 VERIFY_SIGNATURE_FN VerifySignature; | |
| 948 FREE_CONTEXT_BUFFER_FN FreeContextBuffer; | |
| 949 QUERY_SECURITY_PACKAGE_INFO_FN_W QuerySecurityPackageInfoW; | |
| 950 void *Reserved3; | |
| 951 void *Reserved4; | |
| 952 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext; | |
| 953 IMPORT_SECURITY_CONTEXT_FN_W ImportSecurityContextW; | |
| 954 ADD_CREDENTIALS_FN_W AddCredentialsW; | |
| 955 void *Reserved8; | |
| 956 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken; | |
| 957 ENCRYPT_MESSAGE_FN EncryptMessage; | |
| 958 DECRYPT_MESSAGE_FN DecryptMessage; | |
| 959 SET_CONTEXT_ATTRIBUTES_FN_W SetContextAttributesW; | |
| 960 SET_CREDENTIALS_ATTRIBUTES_FN_W SetCredentialsAttributesW; | |
| 961 } SecurityFunctionTableW,*PSecurityFunctionTableW; | |
| 962 | |
| 963 typedef struct _SECURITY_FUNCTION_TABLE_A { | |
| 964 unsigned long dwVersion; | |
| 965 ENUMERATE_SECURITY_PACKAGES_FN_A EnumerateSecurityPackagesA; | |
| 966 QUERY_CREDENTIALS_ATTRIBUTES_FN_A QueryCredentialsAttributesA; | |
| 967 ACQUIRE_CREDENTIALS_HANDLE_FN_A AcquireCredentialsHandleA; | |
| 968 FREE_CREDENTIALS_HANDLE_FN FreeCredentialHandle; | |
| 969 void *Reserved2; | |
| 970 INITIALIZE_SECURITY_CONTEXT_FN_A InitializeSecurityContextA; | |
| 971 ACCEPT_SECURITY_CONTEXT_FN AcceptSecurityContext; | |
| 972 COMPLETE_AUTH_TOKEN_FN CompleteAuthToken; | |
| 973 DELETE_SECURITY_CONTEXT_FN DeleteSecurityContext; | |
| 974 APPLY_CONTROL_TOKEN_FN ApplyControlToken; | |
| 975 QUERY_CONTEXT_ATTRIBUTES_FN_A QueryContextAttributesA; | |
| 976 IMPERSONATE_SECURITY_CONTEXT_FN ImpersonateSecurityContext; | |
| 977 REVERT_SECURITY_CONTEXT_FN RevertSecurityContext; | |
| 978 MAKE_SIGNATURE_FN MakeSignature; | |
| 979 VERIFY_SIGNATURE_FN VerifySignature; | |
| 980 FREE_CONTEXT_BUFFER_FN FreeContextBuffer; | |
| 981 QUERY_SECURITY_PACKAGE_INFO_FN_A QuerySecurityPackageInfoA; | |
| 982 void *Reserved3; | |
| 983 void *Reserved4; | |
| 984 EXPORT_SECURITY_CONTEXT_FN ExportSecurityContext; | |
| 985 IMPORT_SECURITY_CONTEXT_FN_A ImportSecurityContextA; | |
| 986 ADD_CREDENTIALS_FN_A AddCredentialsA; | |
| 987 void *Reserved8; | |
| 988 QUERY_SECURITY_CONTEXT_TOKEN_FN QuerySecurityContextToken; | |
| 989 ENCRYPT_MESSAGE_FN EncryptMessage; | |
| 990 DECRYPT_MESSAGE_FN DecryptMessage; | |
| 991 SET_CONTEXT_ATTRIBUTES_FN_A SetContextAttributesA; | |
| 992 SET_CREDENTIALS_ATTRIBUTES_FN_A SetCredentialsAttributesA; | |
| 993 } SecurityFunctionTableA,*PSecurityFunctionTableA; | |
| 994 | |
| 995 #ifdef UNICODE | |
| 996 #define SecurityFunctionTable SecurityFunctionTableW | |
| 997 #define PSecurityFunctionTable PSecurityFunctionTableW | |
| 998 #else | |
| 999 #define SecurityFunctionTable SecurityFunctionTableA | |
| 1000 #define PSecurityFunctionTable PSecurityFunctionTableA | |
| 1001 #endif | |
| 1002 | |
| 1003 #define SECURITY_ | |
| 1004 | |
| 1005 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION 1 | |
| 1006 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_2 2 | |
| 1007 #define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION_3 3 | |
| 1008 | |
| 1009 PSecurityFunctionTableA WINAPI InitSecurityInterfaceA(void); | |
| 1010 | |
| 1011 typedef PSecurityFunctionTableA (WINAPI *INIT_SECURITY_INTERFACE_A)(void); | |
| 1012 | |
| 1013 KSECDDDECLSPEC PSecurityFunctionTableW WINAPI InitSecurityInterfaceW(void); | |
| 1014 | |
| 1015 typedef PSecurityFunctionTableW (WINAPI *INIT_SECURITY_INTERFACE_W)(void); | |
| 1016 | |
| 1017 #ifdef UNICODE | |
| 1018 #define InitSecurityInterface InitSecurityInterfaceW | |
| 1019 #define INIT_SECURITY_INTERFACE INIT_SECURITY_INTERFACE_W | |
| 1020 #else | |
| 1021 #define InitSecurityInterface InitSecurityInterfaceA | |
| 1022 #define INIT_SECURITY_INTERFACE INIT_SECURITY_INTERFACE_A | |
| 1023 #endif | |
| 1024 | |
| 1025 #ifdef SECURITY_WIN32 | |
| 1026 | |
| 1027 SECURITY_STATUS WINAPI SaslEnumerateProfilesA(LPSTR *ProfileList,ULONG *ProfileCount); | |
| 1028 SECURITY_STATUS WINAPI SaslEnumerateProfilesW(LPWSTR *ProfileList,ULONG *ProfileCount); | |
| 1029 | |
| 1030 #ifdef UNICODE | |
| 1031 #define SaslEnumerateProfiles SaslEnumerateProfilesW | |
| 1032 #else | |
| 1033 #define SaslEnumerateProfiles SaslEnumerateProfilesA | |
| 1034 #endif | |
| 1035 | |
| 1036 SECURITY_STATUS WINAPI SaslGetProfilePackageA(LPSTR ProfileName,PSecPkgInfoA *PackageInfo); | |
| 1037 SECURITY_STATUS WINAPI SaslGetProfilePackageW(LPWSTR ProfileName,PSecPkgInfoW *PackageInfo); | |
| 1038 | |
| 1039 #ifdef UNICODE | |
| 1040 #define SaslGetProfilePackage SaslGetProfilePackageW | |
| 1041 #else | |
| 1042 #define SaslGetProfilePackage SaslGetProfilePackageA | |
| 1043 #endif | |
| 1044 | |
| 1045 SECURITY_STATUS WINAPI SaslIdentifyPackageA(PSecBufferDesc pInput,PSecPkgInfoA *PackageInfo); | |
| 1046 SECURITY_STATUS WINAPI SaslIdentifyPackageW(PSecBufferDesc pInput,PSecPkgInfoW *PackageInfo); | |
| 1047 | |
| 1048 #ifdef UNICODE | |
| 1049 #define SaslIdentifyPackage SaslIdentifyPackageW | |
| 1050 #else | |
| 1051 #define SaslIdentifyPackage SaslIdentifyPackageA | |
| 1052 #endif | |
| 1053 | |
| 1054 SECURITY_STATUS WINAPI SaslInitializeSecurityContextW(PCredHandle phCredential,PCtxtHandle phContext,LPWSTR pszTargetName,unsigned long fContextReq,unsigned long Reserved1,unsigned long TargetDataRep,PSecBufferDesc pInput,unsigned long Reserved2,PCtxtHandle phNewContext,PSecBufferDesc pOutput,unsigned long *pfContextAttr,PTimeStamp ptsExpiry); | |
| 1055 SECURITY_STATUS WINAPI SaslInitializeSecurityContextA(PCredHandle phCredential,PCtxtHandle phContext,LPSTR pszTargetName,unsigned long fContextReq,unsigned long Reserved1,unsigned long TargetDataRep,PSecBufferDesc pInput,unsigned long Reserved2,PCtxtHandle phNewContext,PSecBufferDesc pOutput,unsigned long *pfContextAttr,PTimeStamp ptsExpiry); | |
| 1056 | |
| 1057 #ifdef UNICODE | |
| 1058 #define SaslInitializeSecurityContext SaslInitializeSecurityContextW | |
| 1059 #else | |
| 1060 #define SaslInitializeSecurityContext SaslInitializeSecurityContextA | |
| 1061 #endif | |
| 1062 | |
| 1063 SECURITY_STATUS WINAPI SaslAcceptSecurityContext(PCredHandle phCredential,PCtxtHandle phContext,PSecBufferDesc pInput,unsigned long fContextReq,unsigned long TargetDataRep,PCtxtHandle phNewContext,PSecBufferDesc pOutput,unsigned long *pfContextAttr,PTimeStamp ptsExpiry); | |
| 1064 | |
| 1065 #define SASL_OPTION_SEND_SIZE 1 | |
| 1066 #define SASL_OPTION_RECV_SIZE 2 | |
| 1067 #define SASL_OPTION_AUTHZ_STRING 3 | |
| 1068 #define SASL_OPTION_AUTHZ_PROCESSING 4 | |
| 1069 | |
| 1070 typedef enum _SASL_AUTHZID_STATE { | |
| 1071 Sasl_AuthZIDForbidden,Sasl_AuthZIDProcessed | |
| 1072 } SASL_AUTHZID_STATE; | |
| 1073 | |
| 1074 SECURITY_STATUS WINAPI SaslSetContextOption(PCtxtHandle ContextHandle,ULONG Option,PVOID Value,ULONG Size); | |
| 1075 SECURITY_STATUS WINAPI SaslGetContextOption(PCtxtHandle ContextHandle,ULONG Option,PVOID Value,ULONG Size,PULONG Needed); | |
| 1076 #endif | |
| 1077 | |
| 1078 #ifndef _AUTH_IDENTITY_DEFINED | |
| 1079 #define _AUTH_IDENTITY_DEFINED | |
| 1080 | |
| 1081 #define SEC_WINNT_AUTH_IDENTITY_ANSI 0x1 | |
| 1082 #define SEC_WINNT_AUTH_IDENTITY_UNICODE 0x2 | |
| 1083 | |
| 1084 typedef struct _SEC_WINNT_AUTH_IDENTITY_W { | |
| 1085 unsigned short *User; | |
| 1086 unsigned long UserLength; | |
| 1087 unsigned short *Domain; | |
| 1088 unsigned long DomainLength; | |
| 1089 unsigned short *Password; | |
| 1090 unsigned long PasswordLength; | |
| 1091 unsigned long Flags; | |
| 1092 } SEC_WINNT_AUTH_IDENTITY_W,*PSEC_WINNT_AUTH_IDENTITY_W; | |
| 1093 | |
| 1094 typedef struct _SEC_WINNT_AUTH_IDENTITY_A { | |
| 1095 unsigned char *User; | |
| 1096 unsigned long UserLength; | |
| 1097 unsigned char *Domain; | |
| 1098 unsigned long DomainLength; | |
| 1099 unsigned char *Password; | |
| 1100 unsigned long PasswordLength; | |
| 1101 unsigned long Flags; | |
| 1102 } SEC_WINNT_AUTH_IDENTITY_A,*PSEC_WINNT_AUTH_IDENTITY_A; | |
| 1103 | |
| 1104 #ifdef UNICODE | |
| 1105 #define SEC_WINNT_AUTH_IDENTITY SEC_WINNT_AUTH_IDENTITY_W | |
| 1106 #define PSEC_WINNT_AUTH_IDENTITY PSEC_WINNT_AUTH_IDENTITY_W | |
| 1107 #define _SEC_WINNT_AUTH_IDENTITY _SEC_WINNT_AUTH_IDENTITY_W | |
| 1108 #else | |
| 1109 #define SEC_WINNT_AUTH_IDENTITY SEC_WINNT_AUTH_IDENTITY_A | |
| 1110 #define PSEC_WINNT_AUTH_IDENTITY PSEC_WINNT_AUTH_IDENTITY_A | |
| 1111 #define _SEC_WINNT_AUTH_IDENTITY _SEC_WINNT_AUTH_IDENTITY_A | |
| 1112 #endif | |
| 1113 #endif | |
| 1114 | |
| 1115 #ifndef SEC_WINNT_AUTH_IDENTITY_VERSION | |
| 1116 #define SEC_WINNT_AUTH_IDENTITY_VERSION 0x200 | |
| 1117 | |
| 1118 typedef struct _SEC_WINNT_AUTH_IDENTITY_EXW { | |
| 1119 unsigned long Version; | |
| 1120 unsigned long Length; | |
| 1121 unsigned short *User; | |
| 1122 unsigned long UserLength; | |
| 1123 unsigned short *Domain; | |
| 1124 unsigned long DomainLength; | |
| 1125 unsigned short *Password; | |
| 1126 unsigned long PasswordLength; | |
| 1127 unsigned long Flags; | |
| 1128 unsigned short *PackageList; | |
| 1129 unsigned long PackageListLength; | |
| 1130 } SEC_WINNT_AUTH_IDENTITY_EXW,*PSEC_WINNT_AUTH_IDENTITY_EXW; | |
| 1131 | |
| 1132 typedef struct _SEC_WINNT_AUTH_IDENTITY_EXA { | |
| 1133 unsigned long Version; | |
| 1134 unsigned long Length; | |
| 1135 unsigned char *User; | |
| 1136 unsigned long UserLength; | |
| 1137 unsigned char *Domain; | |
| 1138 unsigned long DomainLength; | |
| 1139 unsigned char *Password; | |
| 1140 unsigned long PasswordLength; | |
| 1141 unsigned long Flags; | |
| 1142 unsigned char *PackageList; | |
| 1143 unsigned long PackageListLength; | |
| 1144 } SEC_WINNT_AUTH_IDENTITY_EXA,*PSEC_WINNT_AUTH_IDENTITY_EXA; | |
| 1145 | |
| 1146 #ifdef UNICODE | |
| 1147 #define SEC_WINNT_AUTH_IDENTITY_EX SEC_WINNT_AUTH_IDENTITY_EXW | |
| 1148 #define PSEC_WINNT_AUTH_IDENTITY_EX PSEC_WINNT_AUTH_IDENTITY_EXW | |
| 1149 #else | |
| 1150 #define SEC_WINNT_AUTH_IDENTITY_EX SEC_WINNT_AUTH_IDENTITY_EXA | |
| 1151 #endif | |
| 1152 #endif | |
| 1153 | |
| 1154 #define SEC_WINNT_AUTH_IDENTITY_MARSHALLED 0x4 | |
| 1155 #define SEC_WINNT_AUTH_IDENTITY_ONLY 0x8 | |
| 1156 | |
| 1157 typedef struct _SECURITY_PACKAGE_OPTIONS { | |
| 1158 unsigned long Size; | |
| 1159 unsigned long Type; | |
| 1160 unsigned long Flags; | |
| 1161 unsigned long SignatureSize; | |
| 1162 void *Signature; | |
| 1163 } SECURITY_PACKAGE_OPTIONS,*PSECURITY_PACKAGE_OPTIONS; | |
| 1164 | |
| 1165 #define SECPKG_OPTIONS_TYPE_UNKNOWN 0 | |
| 1166 #define SECPKG_OPTIONS_TYPE_LSA 1 | |
| 1167 #define SECPKG_OPTIONS_TYPE_SSPI 2 | |
| 1168 | |
| 1169 #define SECPKG_OPTIONS_PERMANENT 0x00000001 | |
| 1170 | |
| 1171 #ifdef UNICODE | |
| 1172 #define AddSecurityPackage AddSecurityPackageW | |
| 1173 #define DeleteSecurityPackage DeleteSecurityPackageW | |
| 1174 #else | |
| 1175 #define AddSecurityPackage AddSecurityPackageA | |
| 1176 #define DeleteSecurityPackage DeleteSecurityPackageA | |
| 1177 #endif | |
| 1178 | |
| 1179 SECURITY_STATUS WINAPI AddSecurityPackageA(SEC_CHAR *pszPackageName,SECURITY_PACKAGE_OPTIONS *Options); | |
| 1180 SECURITY_STATUS WINAPI AddSecurityPackageW(SEC_WCHAR *pszPackageName,SECURITY_PACKAGE_OPTIONS *Options); | |
| 1181 SECURITY_STATUS WINAPI DeleteSecurityPackageA(SEC_CHAR *pszPackageName); | |
| 1182 SECURITY_STATUS WINAPI DeleteSecurityPackageW(SEC_WCHAR *pszPackageName); | |
| 1183 | |
| 1184 | |
| 1185 #ifdef __cplusplus | |
| 1186 } | |
| 1187 #endif | |
| 1188 #endif |
