From 94537c73df68020bfc264b947d71ecf4f21d624e Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Mon, 11 Jan 2021 18:33:44 +0000 Subject: Print error if SSL_{connect,accept,shutdown}(3) don't run to completion. --- regress/lib/libssl/unit/ssl_get_shared_ciphers.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'regress/lib') 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 * @@ -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 */ -- cgit v1.2.3