diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-01-11 18:33:44 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-01-11 18:33:44 +0000 |
commit | 94537c73df68020bfc264b947d71ecf4f21d624e (patch) | |
tree | a328ca75a9e05a5faae9b9367d45cba9eef3319a /regress/lib | |
parent | 6f2cff0d2dd50818451210a7c7d383c03e1d26fb (diff) |
Print error if SSL_{connect,accept,shutdown}(3) don't run to completion.
Diffstat (limited to 'regress/lib')
-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 */ |