Skip to content

Commit 6588011

Browse files
for debug
Signed-off-by: Ronald Cron <[email protected]>
1 parent f51d1a9 commit 6588011

File tree

185 files changed

+3368
-105439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+3368
-105439
lines changed

include/mbedtls/debug.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
*
109109
* This module provides debugging functions.
110110
*/
111-
#if (defined(__MINGW32__) && __USE_MINGW_ANSI_STDIO == 0) || (defined(_MSC_VER) && _MSC_VER < 1800)
111+
#if (defined(__MINGW32__) && __USE_MINGW_ANSI_STDIO == 0) || (defined(_MSC_VER) && _MSC_VER <= 1800)
112112
#include <inttypes.h>
113113
#define MBEDTLS_PRINTF_SIZET PRIuPTR
114114
#define MBEDTLS_PRINTF_LONGLONG "I64d"

library/debug.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ void mbedtls_debug_print_msg(const mbedtls_ssl_context *ssl, int level,
6767
return;
6868
}
6969

70+
mbedtls_fprintf(stderr, "b1 %s-%d\n", file, line);
71+
7072
va_start(argp, format);
7173
ret = mbedtls_vsnprintf(str, DEBUG_BUF_SIZE, format, argp);
7274
va_end(argp);
7375

76+
mbedtls_fprintf(stderr, "a1 %s-%d\n", file, line);
77+
7478
if (ret < 0) {
7579
ret = 0;
7680
} else {
@@ -81,7 +85,10 @@ void mbedtls_debug_print_msg(const mbedtls_ssl_context *ssl, int level,
8185
str[ret] = '\n';
8286
str[ret + 1] = '\0';
8387

88+
mbedtls_fprintf(stderr, "b2\n");
8489
debug_send_line(ssl, level, file, line, str);
90+
mbedtls_fprintf(stderr, "a2\n");
91+
fflush(stderr);
8592
}
8693

8794
void mbedtls_debug_print_ret(const mbedtls_ssl_context *ssl, int level,

tests/scripts/all.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,14 +1064,10 @@ component_check_test_dependencies () {
10641064
# PSA_VENDOR_RSA_MAX_KEY_BITS. The legacy module is only used by
10651065
# the test code and that's probably the most convenient way of achieving
10661066
# the test's goal.
1067-
echo "MBEDTLS_ASN1_WRITE_C" >> $expected
10681067
# No PSA equivalent - we should probably have one in the future.
1069-
echo "MBEDTLS_ECP_RESTARTABLE" >> $expected
10701068
# No PSA equivalent - needed by some init tests
1071-
echo "MBEDTLS_ENTROPY_NV_SEED" >> $expected
10721069
# Used by two tests that are about an extension to the PSA standard;
10731070
# as such, no PSA equivalent.
1074-
echo "MBEDTLS_PEM_PARSE_C" >> $expected
10751071
10761072
# Compare reality with expectation.
10771073
# We want an exact match, to ensure the above list remains up-to-date.

tests/src/test_helpers/ssl_helpers.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include <test/ssl_helpers.h>
1212
#include "md_psa.h"
1313

14+
int mbedtls_ssl_test_helper_enable_log_analyzer_fprintf = 0;
15+
1416
#if defined(MBEDTLS_SSL_TLS_C)
1517
#if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED)
1618
static int rng_seed = 0xBEEF;
@@ -29,17 +31,11 @@ void mbedtls_test_ssl_log_analyzer(void *ctx, int level,
2931
const char *file, int line,
3032
const char *str)
3133
{
32-
mbedtls_test_ssl_log_pattern *p = (mbedtls_test_ssl_log_pattern *) ctx;
33-
34+
(void) ctx;
3435
(void) level;
35-
(void) line;
3636
(void) file;
37-
38-
if (NULL != p &&
39-
NULL != p->pattern &&
40-
NULL != strstr(str, p->pattern)) {
41-
p->counter++;
42-
}
37+
(void) line;
38+
(void) str;
4339
}
4440

4541
void mbedtls_test_init_handshake_options(

tests/suites/test_suite_aes.cbc.data

Lines changed: 0 additions & 263 deletions
This file was deleted.

tests/suites/test_suite_aes.cfb.data

Lines changed: 0 additions & 507 deletions
This file was deleted.

tests/suites/test_suite_aes.ecb.data

Lines changed: 0 additions & 289 deletions
This file was deleted.

0 commit comments

Comments
 (0)