From a8e76085a7414068aa96b6544b28afc1e1e1010c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 22 Aug 2004 05:37:39 +0000 Subject: [PATCH] r1992: Make the NTLMSSP torture test show more detail, and return failure etc. Andrew Bartlett --- source/torture/auth/ntlmssp.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/source/torture/auth/ntlmssp.c b/source/torture/auth/ntlmssp.c index c6415b05c78..02b7ad80b2d 100644 --- a/source/torture/auth/ntlmssp.c +++ b/source/torture/auth/ntlmssp.c @@ -50,8 +50,17 @@ BOOL torture_ntlmssp_self_check(int dummy) expected_sig = strhex_to_data_blob("01000000e37f97f2544f4d7e00000000"); - dump_data_pw("NTLMSSP sig: ", sig.data, sig.length); - dump_data_pw("NTLMSSP sig: ", expected_sig.data, expected_sig.length); + dump_data_pw("NTLMSSP calc sig: ", sig.data, sig.length); + dump_data_pw("NTLMSSP expected sig: ", expected_sig.data, expected_sig.length); + + if (sig.length != expected_sig.length) { + printf("Wrong sig length: %d != %d\n", sig.length, expected_sig.length); + return False; + } + + if (memcmp(sig.data, expected_sig.data, sig.length)) { + return False; + } ntlmssp_end(&ntlmssp_state); @@ -78,8 +87,17 @@ BOOL torture_ntlmssp_self_check(int dummy) expected_sig = strhex_to_data_blob("0100000078010900397420fe0e5a0f89"); - dump_data_pw("NTLMSSP sig: ", sig.data, sig.length); - dump_data_pw("NTLMSSP sig: ", expected_sig.data, expected_sig.length); + dump_data_pw("NTLMSSP calc sig: ", sig.data, sig.length); + dump_data_pw("NTLMSSP expected sig: ", expected_sig.data, expected_sig.length); + + if (sig.length != expected_sig.length) { + printf("Wrong sig length: %d != %d\n", sig.length, expected_sig.length); + return False; + } + + if (memcmp(sig.data, expected_sig.data, sig.length)) { + return False; + } return True; }