From 4e77257faf4d45967bf2bb8e8447f96d7bf844d9 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Sat, 23 Feb 2019 23:49:19 +0800 Subject: [PATCH] obtain human-readable error message for SSL_connect Signed-off-by: Jianhui Zhao --- src/ssl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ssl.c b/src/ssl.c index b7671e8..96b8ba4 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -128,6 +128,7 @@ int uwsc_ssl_handshake(struct uwsc_ssl_ctx *ctx) int err = SSL_get_error(ctx->ssl, ret); if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) return 0; + uwsc_log_err("%s\n", ERR_error_string(err, NULL)); return -1; } #endif