From d2989cc32db217b9918b84a8927db76c73148dab Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 9 Aug 2006 14:31:53 +0200 Subject: [PATCH] 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 1b33ddb6ae4..d8962a5e0a7 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -963,7 +963,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_QueryContextAttributesW(PCtxtHandle phCont 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 ba3fc73e46d..b8099f804ac 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, BOOL fake) "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, BOOL fake) 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, BOOL fake) 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); -- 2.11.4.GIT