From 0e5260c4f5defecce814243df18c0ab36dd7387b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 22 Aug 2004 05:37:39 +0000 Subject: r1992: Make the NTLMSSP torture test show more detail, and return failure etc. Andrew Bartlett (This used to be commit a8e76085a7414068aa96b6544b28afc1e1e1010c) --- source4/torture/auth/ntlmssp.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/source4/torture/auth/ntlmssp.c b/source4/torture/auth/ntlmssp.c index c6415b05c7..02b7ad80b2 100644 --- a/source4/torture/auth/ntlmssp.c +++ b/source4/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; } -- cgit