diff options
author | jsing <> | 2021-02-06 07:34:34 +0000 |
---|---|---|
committer | jsing <> | 2021-02-06 07:34:34 +0000 |
commit | 5d448d2a409a6e63d9f2092effe4d82d0c0ed012 (patch) | |
tree | 44390586239d8cdb10ed3c0050de9027172b9bf1 /src | |
parent | 9c4ebcf34a97f2443372ea9e4a19f5ce8e9beb77 (diff) | |
download | openbsd-5d448d2a409a6e63d9f2092effe4d82d0c0ed012.tar.gz openbsd-5d448d2a409a6e63d9f2092effe4d82d0c0ed012.tar.bz2 openbsd-5d448d2a409a6e63d9f2092effe4d82d0c0ed012.zip |
Only hexdump packets/messages on higher debug levels.
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libssl/dtls/dtlstest.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/regress/lib/libssl/dtls/dtlstest.c b/src/regress/lib/libssl/dtls/dtlstest.c index cb83ced4d3..4274dee7f6 100644 --- a/src/regress/lib/libssl/dtls/dtlstest.c +++ b/src/regress/lib/libssl/dtls/dtlstest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dtlstest.c,v 1.5 2021/02/06 07:33:27 jsing Exp $ */ | 1 | /* $OpenBSD: dtlstest.c,v 1.6 2021/02/06 07:34:34 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2020 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -149,7 +149,8 @@ bio_packet_monkey_write(BIO *bio, const char *in, int in_len) | |||
149 | if (debug) { | 149 | if (debug) { |
150 | fprintf(stderr, "DEBUG: %s packet...\n", | 150 | fprintf(stderr, "DEBUG: %s packet...\n", |
151 | drop ? "dropping" : "writing"); | 151 | drop ? "dropping" : "writing"); |
152 | hexdump(in, in_len); | 152 | if (debug > 1) |
153 | hexdump(in, in_len); | ||
153 | } | 154 | } |
154 | if (drop) | 155 | if (drop) |
155 | return in_len; | 156 | return in_len; |
@@ -435,7 +436,7 @@ do_read(SSL *ssl, const char *name, int *done, short *events) | |||
435 | 436 | ||
436 | if ((ssl_ret = SSL_read(ssl, buf, sizeof(buf))) > 0) { | 437 | if ((ssl_ret = SSL_read(ssl, buf, sizeof(buf))) > 0) { |
437 | fprintf(stderr, "INFO: %s read done\n", name); | 438 | fprintf(stderr, "INFO: %s read done\n", name); |
438 | if (debug) | 439 | if (debug > 1) |
439 | hexdump(buf, ssl_ret); | 440 | hexdump(buf, ssl_ret); |
440 | *done = 1; | 441 | *done = 1; |
441 | return 1; | 442 | return 1; |