summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-08-22 05:37:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:15 -0500
commit0e5260c4f5defecce814243df18c0ab36dd7387b (patch)
treefaf1a2d276b27961f2d36ce57dbc34d10b69514a /source4/torture
parent39a3d5eedc04a365cf2df215a39bec4fc8e170f0 (diff)
downloadsamba-0e5260c4f5defecce814243df18c0ab36dd7387b.tar.gz
samba-0e5260c4f5defecce814243df18c0ab36dd7387b.tar.bz2
samba-0e5260c4f5defecce814243df18c0ab36dd7387b.zip
r1992: Make the NTLMSSP torture test show more detail, and return failure etc.
Andrew Bartlett (This used to be commit a8e76085a7414068aa96b6544b28afc1e1e1010c)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/auth/ntlmssp.c26
1 files 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;
}