Blob Blame History Raw
From 0cafa1b290e7f28f75d2796d0253d4f3a2839562 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 6 Dec 2019 08:12:34 +0100
Subject: [PATCH 162/187] auth:tests: Improve debug output of test_gnutls

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 1c65f1fddba77e94edc5338af81c9a25e0d4e970)
---
 libcli/auth/tests/test_gnutls.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/libcli/auth/tests/test_gnutls.c b/libcli/auth/tests/test_gnutls.c
index f4ef4ec19c8..066d5cf0a9d 100644
--- a/libcli/auth/tests/test_gnutls.c
+++ b/libcli/auth/tests/test_gnutls.c
@@ -72,7 +72,9 @@ static void torture_gnutls_aes_128_cfb_flags(void **state,
 
 	DEBUG(0,("confounder before crypt:\n"));
 	dump_data(0, confounder, 8);
+	DEBUG(0,("initial seq num:\n"));
 	dump_data(0, seq_num_initial.data, 8);
+	DEBUG(0,("io data before crypt:\n"));
 	dump_data(0, io.data, io.length);
 
 	for (i = 0; i < key.size; i++) {
@@ -100,10 +102,12 @@ static void torture_gnutls_aes_128_cfb_flags(void **state,
 				   io.length);
 	assert_int_equal(rc, 0);
 
-	dump_data(0, io.data, io.length);
 	DEBUG(0,("confounder after crypt:\n"));
 	dump_data(0, confounder, 8);
+	DEBUG(0,("initial seq num:\n"));
 	dump_data(0, seq_num_initial.data, 8);
+	DEBUG(0,("io data after crypt:\n"));
+	dump_data(0, io.data, io.length);
 	assert_memory_equal(io.data, crypt_expected.data, crypt_expected.length);
 	assert_memory_equal(confounder, confounder_expected.data, confounder_expected.length);
 
@@ -118,10 +122,12 @@ static void torture_gnutls_aes_128_cfb_flags(void **state,
 	assert_int_equal(rc, 0);
 	gnutls_cipher_deinit(cipher_hnd);
 
-	dump_data(0, io.data, io.length);
 	DEBUG(0,("confounder after decrypt:\n"));
 	dump_data(0, confounder, 8);
+	DEBUG(0,("initial seq num:\n"));
 	dump_data(0, seq_num_initial.data, 8);
+	DEBUG(0,("io data after decrypt:\n"));
+	dump_data(0, io.data, io.length);
 	assert_memory_equal(io.data, clear_initial.data, clear_initial.length);
 	assert_memory_equal(confounder, confounder_initial.data, confounder_initial.length);
 }
-- 
2.23.0