diff options
author | 2021-01-11 18:33:43 +0000 | |
---|---|---|
committer | 2021-01-11 18:33:43 +0000 | |
commit | fc736411e73545a5e5673eff971472a6875878c8 (patch) | |
tree | 0c7e44818d19440877ae835e98d78bd14ad10ce0 | |
parent | Shut down the TLS connections properly. (diff) | |
download | wireguard-openbsd-fc736411e73545a5e5673eff971472a6875878c8.tar.xz wireguard-openbsd-fc736411e73545a5e5673eff971472a6875878c8.zip |
Print error if SSL_{connect,accept,shutdown}(3) don't run to completion.
-rw-r--r-- | regress/lib/libssl/unit/ssl_get_shared_ciphers.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/regress/lib/libssl/unit/ssl_get_shared_ciphers.c b/regress/lib/libssl/unit/ssl_get_shared_ciphers.c index d6d09cffd75..cc5b876ab34 100644 --- a/regress/lib/libssl/unit/ssl_get_shared_ciphers.c +++ b/regress/lib/libssl/unit/ssl_get_shared_ciphers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_get_shared_ciphers.c,v 1.5 2021/01/11 18:31:03 tb Exp $ */ +/* $OpenBSD: ssl_get_shared_ciphers.c,v 1.6 2021/01/11 18:33:43 tb Exp $ */ /* * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> * @@ -347,7 +347,12 @@ handshake(SSL *client_ssl, SSL *server_ssl, const char *description) return 0; } - return client_ret == 1 && server_ret == 1; + if (client_ret != 1 || server_ret != 1) { + fprintf(stderr, "%s: failed\n", __func__); + return 0; + } + + return 1; } static int @@ -365,7 +370,12 @@ shutdown(SSL *client_ssl, SSL *server_ssl, const char *description) return 0; } - return client_ret == 1 && server_ret == 1; + if (client_ret != 1 || server_ret != 1) { + fprintf(stderr, "%s: failed\n", __func__); + return 0; + } + + return 1; } /* from ssl_ciph.c */ |