Module: wine Branch: refs/heads/master Commit: d2989cc32db217b9918b84a8927db76c73148dab URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d2989cc32db217b9918b84a8...
Author: Kai Blin kai.blin@gmail.com Date: Wed Aug 9 14:31:53 2006 +0200
secur32: Make ntlm tests run on both WinXP and Win2k.
---
dlls/secur32/ntlm.c | 2 +- dlls/secur32/tests/ntlm.c | 22 +++++----------------- 2 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index 1b33ddb..d8962a5 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -963,7 +963,7 @@ #define _x(x) case (x) : FIXME(#x" stub\ PSecPkgContext_Sizes spcs = (PSecPkgContext_Sizes)pBuffer; spcs->cbMaxToken = NTLM_MAX_BUF; spcs->cbMaxSignature = 16; - spcs->cbBlockSize = 1; + spcs->cbBlockSize = 0; spcs->cbSecurityTrailer = 16; return SEC_E_OK; } diff --git a/dlls/secur32/tests/ntlm.c b/dlls/secur32/tests/ntlm.c index ba3fc73..b8099f8 100644 --- a/dlls/secur32/tests/ntlm.c +++ b/dlls/secur32/tests/ntlm.c @@ -67,12 +67,6 @@ typedef struct _SspiData { ULONG max_token; } SspiData;
-static BYTE client_req[] = - {0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x07, 0x82, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00}; - static BYTE network_challenge[] = {0x4e, 0x54, 0x4c, 0x4d, 0x53, 0x53, 0x50, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x30, 0x00, 0x00, 0x00, @@ -596,14 +590,8 @@ static void testAuth(ULONG data_rep, BOO "Running the client returned %s, more tests will fail.\n", getSecError(client_stat));
- if(first) - todo_wine{ - ok(!memcmp(client.out_buf->pBuffers[0].pvBuffer, client_req, - sizeof(client_req)), "Client gave an invalid reply!\n"); - } - communicate(&client, &server); - + if(fake) server_stat = runFakeServer(&server, first, data_rep); else @@ -619,7 +607,7 @@ static void testAuth(ULONG data_rep, BOO first = FALSE; }
- if(!strcmp(sec_pkg_name, "NTLM")) + if(client_stat == SEC_E_OK) { sec_status = pQueryContextAttributesA(client.ctxt, SECPKG_ATTR_SIZES, &ctxt_sizes); @@ -636,12 +624,12 @@ static void testAuth(ULONG data_rep, BOO ok(ctxt_sizes.cbSecurityTrailer == 16, "cbSecurityTrailer should be 16 but is %lu\n", ctxt_sizes.cbSecurityTrailer); - ok(ctxt_sizes.cbBlockSize == 1, - "cbBlockSize should be 1 but is %lu\n", + ok(ctxt_sizes.cbBlockSize == 0, + "cbBlockSize should be 0 but is %lu\n", ctxt_sizes.cbBlockSize); } else - trace("Unknown sec package %s\n", sec_pkg_name); + trace("Authentication failed, skipping test.\n");
cleanupBuffers(&client); cleanupBuffers(&server);