|
|
b6b438 |
From 0cafa1b290e7f28f75d2796d0253d4f3a2839562 Mon Sep 17 00:00:00 2001
|
|
|
b6b438 |
From: Andreas Schneider <asn@samba.org>
|
|
|
b6b438 |
Date: Fri, 6 Dec 2019 08:12:34 +0100
|
|
|
b6b438 |
Subject: [PATCH 162/187] auth:tests: Improve debug output of test_gnutls
|
|
|
b6b438 |
|
|
|
b6b438 |
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
|
b6b438 |
Reviewed-by: Isaac Boukris <iboukris@samba.org>
|
|
|
b6b438 |
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
|
b6b438 |
(cherry picked from commit 1c65f1fddba77e94edc5338af81c9a25e0d4e970)
|
|
|
b6b438 |
---
|
|
|
b6b438 |
libcli/auth/tests/test_gnutls.c | 10 ++++++++--
|
|
|
b6b438 |
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
b6b438 |
|
|
|
b6b438 |
diff --git a/libcli/auth/tests/test_gnutls.c b/libcli/auth/tests/test_gnutls.c
|
|
|
b6b438 |
index f4ef4ec19c8..066d5cf0a9d 100644
|
|
|
b6b438 |
--- a/libcli/auth/tests/test_gnutls.c
|
|
|
b6b438 |
+++ b/libcli/auth/tests/test_gnutls.c
|
|
|
b6b438 |
@@ -72,7 +72,9 @@ static void torture_gnutls_aes_128_cfb_flags(void **state,
|
|
|
b6b438 |
|
|
|
b6b438 |
DEBUG(0,("confounder before crypt:\n"));
|
|
|
b6b438 |
dump_data(0, confounder, 8);
|
|
|
b6b438 |
+ DEBUG(0,("initial seq num:\n"));
|
|
|
b6b438 |
dump_data(0, seq_num_initial.data, 8);
|
|
|
b6b438 |
+ DEBUG(0,("io data before crypt:\n"));
|
|
|
b6b438 |
dump_data(0, io.data, io.length);
|
|
|
b6b438 |
|
|
|
b6b438 |
for (i = 0; i < key.size; i++) {
|
|
|
b6b438 |
@@ -100,10 +102,12 @@ static void torture_gnutls_aes_128_cfb_flags(void **state,
|
|
|
b6b438 |
io.length);
|
|
|
b6b438 |
assert_int_equal(rc, 0);
|
|
|
b6b438 |
|
|
|
b6b438 |
- dump_data(0, io.data, io.length);
|
|
|
b6b438 |
DEBUG(0,("confounder after crypt:\n"));
|
|
|
b6b438 |
dump_data(0, confounder, 8);
|
|
|
b6b438 |
+ DEBUG(0,("initial seq num:\n"));
|
|
|
b6b438 |
dump_data(0, seq_num_initial.data, 8);
|
|
|
b6b438 |
+ DEBUG(0,("io data after crypt:\n"));
|
|
|
b6b438 |
+ dump_data(0, io.data, io.length);
|
|
|
b6b438 |
assert_memory_equal(io.data, crypt_expected.data, crypt_expected.length);
|
|
|
b6b438 |
assert_memory_equal(confounder, confounder_expected.data, confounder_expected.length);
|
|
|
b6b438 |
|
|
|
b6b438 |
@@ -118,10 +122,12 @@ static void torture_gnutls_aes_128_cfb_flags(void **state,
|
|
|
b6b438 |
assert_int_equal(rc, 0);
|
|
|
b6b438 |
gnutls_cipher_deinit(cipher_hnd);
|
|
|
b6b438 |
|
|
|
b6b438 |
- dump_data(0, io.data, io.length);
|
|
|
b6b438 |
DEBUG(0,("confounder after decrypt:\n"));
|
|
|
b6b438 |
dump_data(0, confounder, 8);
|
|
|
b6b438 |
+ DEBUG(0,("initial seq num:\n"));
|
|
|
b6b438 |
dump_data(0, seq_num_initial.data, 8);
|
|
|
b6b438 |
+ DEBUG(0,("io data after decrypt:\n"));
|
|
|
b6b438 |
+ dump_data(0, io.data, io.length);
|
|
|
b6b438 |
assert_memory_equal(io.data, clear_initial.data, clear_initial.length);
|
|
|
b6b438 |
assert_memory_equal(confounder, confounder_initial.data, confounder_initial.length);
|
|
|
b6b438 |
}
|
|
|
b6b438 |
--
|
|
|
b6b438 |
2.23.0
|
|
|
b6b438 |
|