ReactOS 0.4.15-dev-7942-gd23573b
secur32.c
Go to the documentation of this file.
1/*
2 * tests
3 *
4 * Copyright 2006 Robert Reif
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20#include <stdio.h>
21#include <stdarg.h>
22#include <windef.h>
23#include <winbase.h>
24#include <winnls.h>
25#include <rpc.h>
26#include <rpcdce.h>
27#define SECURITY_WIN32
28#include <security.h>
29#include <schannel.h>
30#include <wincred.h>
31#include <winsock2.h>
32
33#include "wine/test.h"
34
36
37static SECURITY_STATUS (SEC_ENTRY *pSspiEncodeAuthIdentityAsStrings)
39static SECURITY_STATUS (SEC_ENTRY *pSspiEncodeStringsAsAuthIdentity)
41static void (SEC_ENTRY *pSspiFreeAuthIdentity)
43static void (SEC_ENTRY *pSspiLocalFree)
44 (void *);
45static SECURITY_STATUS (SEC_ENTRY *pSspiPrepareForCredWrite)
47static void (SEC_ENTRY *pSspiZeroAuthIdentity)
49
50static BOOLEAN (WINAPI * pGetComputerObjectNameA)(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer, PULONG lpnSize);
51static BOOLEAN (WINAPI * pGetComputerObjectNameW)(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG lpnSize);
52static BOOLEAN (WINAPI * pGetUserNameExA)(EXTENDED_NAME_FORMAT NameFormat, LPSTR lpNameBuffer, PULONG lpnSize);
53static BOOLEAN (WINAPI * pGetUserNameExW)(EXTENDED_NAME_FORMAT NameFormat, LPWSTR lpNameBuffer, PULONG lpnSize);
54static PSecurityFunctionTableA (SEC_ENTRY * pInitSecurityInterfaceA)(void);
55static PSecurityFunctionTableW (SEC_ENTRY * pInitSecurityInterfaceW)(void);
56
57static EXTENDED_NAME_FORMAT formats[] = {
58 NameUnknown, NameFullyQualifiedDN, NameSamCompatible, NameDisplay,
59 NameUniqueId, NameCanonical, NameUserPrincipal, NameCanonicalEx,
60 NameServicePrincipal, NameDnsDomain
61};
62
64{
65 char name[256];
66 ULONG size;
67 BOOLEAN rc;
68 UINT i;
69
70 for (i = 0; i < ARRAY_SIZE(formats); i++) {
71 size = 0;
72 SetLastError(0xdeadbeef);
73 rc = pGetComputerObjectNameA(formats[i], NULL, &size);
74 ok(!rc, "GetComputerObjectName(%u) should fail\n", formats[i]);
75 switch (formats[i])
76 {
77 case NameUnknown:
79 break;
80 default:
85 "%u: got %u\n", formats[i], GetLastError());
86 break;
87 }
88
89 if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) continue;
90
91 size = sizeof(name);
92 SetLastError(0xdeadbeef);
93 rc = pGetComputerObjectNameA(formats[i], name, &size);
94 switch (formats[i])
95 {
96 case NameUnknown:
97 ok(!rc, "GetComputerObjectName(%u) should fail\n", formats[i]);
99 break;
100 default:
101 ok(rc, "GetComputerObjectName(%u) error %u\n", formats[i], GetLastError());
102 trace("GetComputerObjectName(%u) returned %s\n", formats[i], name);
103 break;
104 }
105 }
106}
107
109{
110 WCHAR nameW[256];
111 ULONG size;
112 BOOLEAN rc;
113 UINT i;
114
115 for (i = 0; i < ARRAY_SIZE(formats); i++) {
116 size = 0;
117 SetLastError(0xdeadbeef);
118 rc = pGetComputerObjectNameW(formats[i], NULL, &size);
119 ok(!rc || broken(rc) /* win10 */, "GetComputerObjectName(%u) should fail\n", formats[i]);
120 switch (formats[i])
121 {
122 case NameUnknown:
123 ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError());
124 break;
125 default:
131 "%u: got %u\n", formats[i], GetLastError());
132 break;
133 }
134
135 if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) continue;
136
138 SetLastError(0xdeadbeef);
139 rc = pGetComputerObjectNameW(formats[i], nameW, &size);
140 switch (formats[i])
141 {
142 case NameUnknown:
143 ok(!rc, "GetComputerObjectName(%u) should fail\n", formats[i]);
144 ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError());
145 break;
146 default:
147 ok(rc, "GetComputerObjectName(%u) error %u\n", formats[i], GetLastError());
148 trace("GetComputerObjectName(%u) returned %s\n", formats[i], wine_dbgstr_w(nameW));
149 break;
150 }
151 }
152}
153
154static void testGetUserNameExA(void)
155{
156 char name[256];
157 ULONG size;
158 BOOLEAN rc;
159 UINT i;
160
161 for (i = 0; i < ARRAY_SIZE(formats); i++) {
162 size = sizeof(name);
163 ZeroMemory(name, sizeof(name));
164 rc = pGetUserNameExA(formats[i], name, &size);
165 ok(rc ||
166 (formats[i] == NameUnknown &&
169 broken(formats[i] == NameDnsDomain &&
171 "GetUserNameExW(%d) failed: %d\n",
173 }
174
175 if (0) /* Crashes on Windows */
176 pGetUserNameExA(NameSamCompatible, NULL, NULL);
177
178 size = 0;
179 rc = pGetUserNameExA(NameSamCompatible, NULL, &size);
180 ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
181 ok(size != 0, "Expected size to be set to required size\n");
182
183 if (0) /* Crashes on Windows with big enough size */
184 {
185 /* Returned size is already big enough */
186 pGetUserNameExA(NameSamCompatible, NULL, &size);
187 }
188
189 size = 0;
190 rc = pGetUserNameExA(NameSamCompatible, name, &size);
191 ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
192 ok(size != 0, "Expected size to be set to required size\n");
193 size = 1;
194 name[0] = 0xff;
195 rc = pGetUserNameExA(NameSamCompatible, name, &size);
196 ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
197 ok(1 < size, "Expected size to be set to required size\n");
198 ok(name[0] == (char) 0xff, "Expected unchanged buffer\n");
199}
200
201static void testGetUserNameExW(void)
202{
203 WCHAR nameW[256];
204 ULONG size;
205 BOOLEAN rc;
206 UINT i;
207
208 for (i = 0; i < ARRAY_SIZE(formats); i++) {
209 size = sizeof(nameW);
210 ZeroMemory(nameW, sizeof(nameW));
211 rc = pGetUserNameExW(formats[i], nameW, &size);
212 ok(rc ||
213 (formats[i] == NameUnknown &&
216 broken(formats[i] == NameDnsDomain &&
218 "GetUserNameExW(%d) failed: %d\n",
220 }
221
222 if (0) /* Crashes on Windows */
223 pGetUserNameExW(NameSamCompatible, NULL, NULL);
224
225 size = 0;
226 rc = pGetUserNameExW(NameSamCompatible, NULL, &size);
227 ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
228 ok(size != 0, "Expected size to be set to required size\n");
229
230 if (0) /* Crashes on Windows with big enough size */
231 {
232 /* Returned size is already big enough */
233 pGetUserNameExW(NameSamCompatible, NULL, &size);
234 }
235
236 size = 0;
237 rc = pGetUserNameExW(NameSamCompatible, nameW, &size);
238 ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
239 ok(size != 0, "Expected size to be set to required size\n");
240 size = 1;
241 nameW[0] = 0xff;
242 rc = pGetUserNameExW(NameSamCompatible, nameW, &size);
243 ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError());
244 ok(1 < size, "Expected size to be set to required size\n");
245 ok(nameW[0] == (WCHAR) 0xff, "Expected unchanged buffer\n");
246}
247
249{
252
253 sftA = pInitSecurityInterfaceA();
254 ok(sftA != NULL, "pInitSecurityInterfaceA failed\n");
255 ok(sftA->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftA->dwVersion);
256 ok(!sftA->Reserved2,
257 "Reserved2 should be NULL instead of %p in security function table\n",
258 sftA->Reserved2);
259 ok(sftA->Reserved3 == sftA->EncryptMessage,
260 "Reserved3 should be equal to EncryptMessage in the security function table\n");
261 ok(sftA->Reserved4 == sftA->DecryptMessage,
262 "Reserved4 should be equal to DecryptMessage in the security function table\n");
263
264 if (!pInitSecurityInterfaceW)
265 {
266 win_skip("InitSecurityInterfaceW not exported by secur32.dll\n");
267 return;
268 }
269
270 sftW = pInitSecurityInterfaceW();
271 ok(sftW != NULL, "pInitSecurityInterfaceW failed\n");
272 ok(sftW->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftW->dwVersion);
273 ok(!sftW->Reserved2, "Reserved2 should be NULL instead of %p in security function table\n", sftW->Reserved2);
274 ok(sftW->Reserved3 == sftW->EncryptMessage, "Reserved3 should be equal to EncryptMessage in the security function table\n");
275 ok(sftW->Reserved4 == sftW->DecryptMessage, "Reserved4 should be equal to DecryptMessage in the security function table\n");
276}
277
279{
280 static const WCHAR username[] = {'u','s','e','r','n','a','m','e',0};
281 static const WCHAR domainname[] = {'d','o','m','a','i','n','n','a','m','e',0};
282 static const WCHAR password[] = {'p','a','s','s','w','o','r','d',0};
283 const WCHAR *username_ptr, *domainname_ptr, *password_ptr;
286
287 if (!pSspiEncodeStringsAsAuthIdentity)
288 {
289 win_skip( "SspiEncodeAuthIdentityAsStrings not exported by secur32.dll\n" );
290 return;
291 }
292
293 status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, NULL, NULL );
294 ok( status == SEC_E_INVALID_TOKEN, "got %08x\n", status );
295
296 id = (PSEC_WINNT_AUTH_IDENTITY_OPAQUE)0xdeadbeef;
297 status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, NULL, &id );
298 ok( status == SEC_E_INVALID_TOKEN, "got %08x\n", status );
299 ok( id == (PSEC_WINNT_AUTH_IDENTITY_OPAQUE)0xdeadbeef, "id set\n" );
300
301 id = NULL;
302 status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, password, &id );
303 ok( status == SEC_E_OK, "got %08x\n", status );
304 ok( id != NULL, "id not set\n" );
305 pSspiFreeAuthIdentity( id );
306
307 id = NULL;
308 status = pSspiEncodeStringsAsAuthIdentity( NULL, domainname, password, &id );
309 ok( status == SEC_E_OK, "got %08x\n", status );
310 ok( id != NULL, "id not set\n" );
311 pSspiFreeAuthIdentity( id );
312
313 id = NULL;
314 status = pSspiEncodeStringsAsAuthIdentity( username, NULL, password, &id );
315 ok( status == SEC_E_OK, "got %08x\n", status );
316 ok( id != NULL, "id not set\n" );
317 pSspiFreeAuthIdentity( id );
318
319 id = NULL;
320 status = pSspiEncodeStringsAsAuthIdentity( username, NULL, NULL, &id );
321 ok( status == SEC_E_OK, "got %08x\n", status );
322 ok( id != NULL, "id not set\n" );
323 pSspiFreeAuthIdentity( id );
324
325 id = NULL;
326 status = pSspiEncodeStringsAsAuthIdentity( username, domainname, password, &id );
327 ok( status == SEC_E_OK, "got %08x\n", status );
328 ok( id != NULL, "id not set\n" );
329
330 username_ptr = domainname_ptr = password_ptr = NULL;
331 status = pSspiEncodeAuthIdentityAsStrings( id, &username_ptr, &domainname_ptr, &password_ptr );
332 ok( status == SEC_E_OK, "got %08x\n", status );
333 ok( !lstrcmpW( username, username_ptr ), "wrong username\n" );
334 ok( !lstrcmpW( domainname, domainname_ptr ), "wrong domainname\n" );
335 ok( !lstrcmpW( password, password_ptr ), "wrong password\n" );
336
337 pSspiZeroAuthIdentity( id );
338
339 pSspiLocalFree( (void *)username_ptr );
340 pSspiLocalFree( (void *)domainname_ptr );
341 pSspiLocalFree( (void *)password_ptr );
342 pSspiFreeAuthIdentity( id );
343
344 id = NULL;
345 status = pSspiEncodeStringsAsAuthIdentity( username, NULL, password, &id );
346 ok( status == SEC_E_OK, "got %08x\n", status );
347 ok( id != NULL, "id not set\n" );
348
349 username_ptr = password_ptr = NULL;
350 domainname_ptr = (const WCHAR *)0xdeadbeef;
351 status = pSspiEncodeAuthIdentityAsStrings( id, &username_ptr, &domainname_ptr, &password_ptr );
352 ok( status == SEC_E_OK, "got %08x\n", status );
353 ok( !lstrcmpW( username, username_ptr ), "wrong username\n" );
354 ok( domainname_ptr == NULL, "domainname_ptr not cleared\n" );
355 ok( !lstrcmpW( password, password_ptr ), "wrong password\n" );
356
357 pSspiLocalFree( (void *)username_ptr );
358 pSspiLocalFree( (void *)password_ptr );
359 pSspiFreeAuthIdentity( id );
360}
361
363{
364 static const WCHAR usernameW[] =
365 {'u','s','e','r','n','a','m','e',0};
366 static const WCHAR domainnameW[] =
367 {'d','o','m','a','i','n','n','a','m','e',0};
368 static const WCHAR passwordW[] =
369 {'p','a','s','s','w','o','r','d',0};
370 static const WCHAR targetW[] =
371 {'d','o','m','a','i','n','n','a','m','e','\\','u','s','e','r','n','a','m','e',0};
372 static const WCHAR target2W[] =
373 {'d','o','m','a','i','n','n','a','m','e','2','\\','u','s','e','r','n','a','m','e','2',0};
374 const WCHAR *target, *username;
377 ULONG type, size;
378 UCHAR *blob;
379
380 if (!pSspiPrepareForCredWrite)
381 {
382 win_skip( "SspiPrepareForCredWrite not exported by secur32.dll\n" );
383 return;
384 }
385
386 status = pSspiEncodeStringsAsAuthIdentity( usernameW, domainnameW, passwordW, &id );
387 ok( status == SEC_E_OK, "got %08x\n", status );
388
389 type = size = 0;
390 status = pSspiPrepareForCredWrite( id, NULL, &type, &target, &username, &blob, &size );
391 ok( status == SEC_E_OK, "got %08x\n", status );
392 ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %u\n", type );
393 ok( !lstrcmpW( target, targetW ), "got %s\n", wine_dbgstr_w(target) );
394 ok( !lstrcmpW( username, targetW ), "got %s\n", wine_dbgstr_w(username) );
395 ok( !memcmp( blob, passwordW, sizeof(passwordW) - sizeof(WCHAR) ), "wrong data\n" );
396 ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %u\n", size );
397 pSspiLocalFree( (void *)target );
398 pSspiLocalFree( (void *)username );
399 pSspiLocalFree( blob );
400
401 type = size = 0;
402 status = pSspiPrepareForCredWrite( id, target2W, &type, &target, &username, &blob, &size );
403 ok( status == SEC_E_OK, "got %08x\n", status );
404 ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %u\n", type );
405 ok( !lstrcmpW( target, target2W ), "got %s\n", wine_dbgstr_w(target) );
406 ok( !lstrcmpW( username, targetW ), "got %s\n", wine_dbgstr_w(username) );
407 ok( !memcmp( blob, passwordW, sizeof(passwordW) - sizeof(WCHAR) ), "wrong data\n" );
408 ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %u\n", size );
409 pSspiLocalFree( (void *)target );
410 pSspiLocalFree( (void *)username );
411 pSspiLocalFree( blob );
412
413 pSspiFreeAuthIdentity( id );
414}
415
416static void test_kerberos(void)
417{
419 TimeStamp ttl;
420 CredHandle cred;
422
423 SEC_CHAR provider[] = {'K','e','r','b','e','r','o','s',0};
424
425 static const ULONG expected_flags =
441 static const ULONG optional_mask =
444 | 0x02000000; /* not defined in the SDK */
445
446
448 ok(status == SEC_E_OK, "Kerberos package not installed, skipping test\n");
449 if(status != SEC_E_OK)
450 return;
451
452 ok( (info->fCapabilities & ~optional_mask) == expected_flags, "got %08x, expected %08x\n", info->fCapabilities, expected_flags );
453 ok( info->wVersion == 1, "got %u\n", info->wVersion );
454 ok( info->wRPCID == RPC_C_AUTHN_GSS_KERBEROS, "got %u\n", info->wRPCID );
455 ok( info->cbMaxToken >= 12000, "got %u\n", info->cbMaxToken );
456 ok( !lstrcmpA( info->Name, "Kerberos" ), "got %s\n", info->Name );
457 ok( !lstrcmpA( info->Comment, "Microsoft Kerberos V1.0" ), "got %s\n", info->Comment );
459
461 NULL, NULL, NULL, &cred, &ttl );
462 todo_wine ok( status == SEC_E_OK, "AcquireCredentialsHandleA returned %08x\n", status );
463 if(status == SEC_E_OK)
464 FreeCredentialHandle( &cred );
465}
466
468{
469 secdll = LoadLibraryA("secur32.dll");
470
471 if (!secdll)
472 secdll = LoadLibraryA("security.dll");
473
474 if (secdll)
475 {
476 pSspiEncodeAuthIdentityAsStrings = (void *)GetProcAddress(secdll, "SspiEncodeAuthIdentityAsStrings");
477 pSspiEncodeStringsAsAuthIdentity = (void *)GetProcAddress(secdll, "SspiEncodeStringsAsAuthIdentity");
478 pSspiFreeAuthIdentity = (void *)GetProcAddress(secdll, "SspiFreeAuthIdentity");
479 pSspiLocalFree = (void *)GetProcAddress(secdll, "SspiLocalFree");
480 pSspiPrepareForCredWrite = (void *)GetProcAddress(secdll, "SspiPrepareForCredWrite");
481 pSspiZeroAuthIdentity = (void *)GetProcAddress(secdll, "SspiZeroAuthIdentity");
482 pGetComputerObjectNameA = (PVOID)GetProcAddress(secdll, "GetComputerObjectNameA");
483 pGetComputerObjectNameW = (PVOID)GetProcAddress(secdll, "GetComputerObjectNameW");
484 pGetUserNameExA = (PVOID)GetProcAddress(secdll, "GetUserNameExA");
485 pGetUserNameExW = (PVOID)GetProcAddress(secdll, "GetUserNameExW");
486 pInitSecurityInterfaceA = (PVOID)GetProcAddress(secdll, "InitSecurityInterfaceA");
487 pInitSecurityInterfaceW = (PVOID)GetProcAddress(secdll, "InitSecurityInterfaceW");
488
489 if (pGetComputerObjectNameA)
491 else
492 win_skip("GetComputerObjectNameA not exported by secur32.dll\n");
493
494 if (pGetComputerObjectNameW)
496 else
497 win_skip("GetComputerObjectNameW not exported by secur32.dll\n");
498
499 if (pGetUserNameExA)
501 else
502 win_skip("GetUserNameExA not exported by secur32.dll\n");
503
504 if (pGetUserNameExW)
506 else
507 win_skip("GetUserNameExW not exported by secur32.dll\n");
508
512
514 }
515
517}
unsigned char BOOLEAN
#define broken(x)
Definition: _sntprintf.h:21
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
static const WCHAR nameW[]
Definition: main.c:46
#define ARRAY_SIZE(A)
Definition: main.h:33
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define NULL
Definition: types.h:112
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
#define SEC_ENTRY
Definition: stubs.c:6
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLuint id
Definition: glext.h:5910
GLenum target
Definition: glext.h:7315
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define wine_dbgstr_w
Definition: kernel32.h:34
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
#define todo_wine
Definition: custom.c:79
static WCHAR password[]
Definition: url.c:33
static WCHAR username[]
Definition: url.c:32
unsigned int UINT
Definition: ndis.h:50
#define BOOLEAN
Definition: pedump.c:73
#define SECPKG_FLAG_APPCONTAINER_CHECKS
Definition: sspi.h:149
#define SECPKG_FLAG_TOKEN_ONLY
Definition: sspi.h:128
LONG SECURITY_STATUS
Definition: sspi.h:34
#define SECPKG_FLAG_IMPERSONATION
Definition: sspi.h:134
#define SECPKG_CRED_OUTBOUND
Definition: sspi.h:291
#define SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION
Definition: sspi.h:1023
void * PSEC_WINNT_AUTH_IDENTITY_OPAQUE
Definition: sspi.h:96
#define SECPKG_FLAG_EXTENDED_ERROR
Definition: sspi.h:133
#define FreeCredentialHandle
Definition: sspi.h:313
#define SECPKG_FLAG_PRIVACY
Definition: sspi.h:127
CHAR SEC_CHAR
Definition: sspi.h:30
#define SECPKG_FLAG_RESTRICTED_TOKENS
Definition: sspi.h:145
#define SECPKG_FLAG_MULTI_REQUIRED
Definition: sspi.h:131
#define SECPKG_FLAG_CONNECTION
Definition: sspi.h:130
#define SECPKG_FLAG_NEGOTIABLE
Definition: sspi.h:137
#define SECPKG_FLAG_DELEGATION
Definition: sspi.h:143
#define SECPKG_FLAG_INTEGRITY
Definition: sspi.h:126
struct _SECURITY_FUNCTION_TABLE_A * PSecurityFunctionTableA
struct _SECURITY_FUNCTION_TABLE_W * PSecurityFunctionTableW
#define SECPKG_FLAG_MUTUAL_AUTH
Definition: sspi.h:142
#define SECPKG_FLAG_DATAGRAM
Definition: sspi.h:129
#define SECPKG_FLAG_LOGON
Definition: sspi.h:139
#define SECPKG_FLAG_READONLY_WITH_CHECKSUM
Definition: sspi.h:144
#define SECPKG_FLAG_ACCEPT_WIN32_NAME
Definition: sspi.h:135
#define SECPKG_FLAG_GSS_COMPATIBLE
Definition: sspi.h:138
#define RPC_C_AUTHN_GSS_KERBEROS
Definition: rpcdce.h:160
#define win_skip
Definition: test.h:160
static PCWSTR PCWSTR PCWSTR *static PCWSTR
Definition: secur32.c:40
static void testGetUserNameExA(void)
Definition: secur32.c:154
static void test_kerberos(void)
Definition: secur32.c:416
static LPSTR lpNameBuffer
Definition: secur32.c:50
static EXTENDED_NAME_FORMAT formats[]
Definition: secur32.c:57
static void test_SspiEncodeStringsAsAuthIdentity(void)
Definition: secur32.c:278
static LPSTR PULONG lpnSize
Definition: secur32.c:50
static HMODULE secdll
Definition: secur32.c:35
static void test_SspiPrepareForCredWrite(void)
Definition: secur32.c:362
static PULONG
Definition: secur32.c:46
static void test_InitSecurityInterface(void)
Definition: secur32.c:248
static void testGetComputerObjectNameW(void)
Definition: secur32.c:108
static void testGetComputerObjectNameA(void)
Definition: secur32.c:63
static void testGetUserNameExW(void)
Definition: secur32.c:201
SECURITY_STATUS WINAPI FreeContextBuffer(PVOID pv)
Definition: sspi.c:699
ENCRYPT_MESSAGE_FN EncryptMessage
Definition: sspi.h:980
DECRYPT_MESSAGE_FN DecryptMessage
Definition: sspi.h:981
ENCRYPT_MESSAGE_FN EncryptMessage
Definition: sspi.h:1015
DECRYPT_MESSAGE_FN DecryptMessage
Definition: sspi.h:1016
Definition: image.c:134
Definition: name.c:39
Definition: ps.c:97
uint32_t * PULONG
Definition: typedefs.h:59
const uint16_t * PCWSTR
Definition: typedefs.h:57
void * PVOID
Definition: typedefs.h:50
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define ZeroMemory
Definition: winbase.h:1712
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define CRED_TYPE_DOMAIN_PASSWORD
Definition: wincred.h:205
#define WINAPI
Definition: msvc.h:6
#define SEC_E_OK
Definition: winerror.h:2356
#define ERROR_CANT_ACCESS_DOMAIN_INFO
Definition: winerror.h:832
#define WSAHOST_NOT_FOUND
Definition: winerror.h:2000
#define SEC_E_INVALID_TOKEN
Definition: winerror.h:2917
#define ERROR_NO_SUCH_USER
Definition: winerror.h:799
#define ERROR_NONE_MAPPED
Definition: winerror.h:814
SECURITY_STATUS WINAPI AcquireCredentialsHandleA(SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse, PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry)
Definition: wrapper.c:59
SECURITY_STATUS WINAPI QuerySecurityPackageInfoA(SEC_CHAR *pszPackageName, PSecPkgInfoA *ppPackageInfo)
Definition: wrapper.c:683
char * LPSTR
Definition: xmlstorage.h:182
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184