From 2648ef578fde5a02f66a434689c5cd16fc837667 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 21 May 2016 13:08:09 +0200 Subject: [PATCH] fix server certificate validation error reporting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit use the right function to decode the error code. found by Andrés Ramírez . --- src/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket.c b/src/socket.c index 9fd6eca..5221cd6 100644 --- a/src/socket.c +++ b/src/socket.c @@ -178,7 +178,7 @@ verify_cert_host( const server_conf_t *conf, conn_t *sock ) err = SSL_get_verify_result( sock->ssl ); if (err != X509_V_OK) { - error( "SSL error connecting %s: %s\n", sock->name, ERR_error_string( err, NULL ) ); + error( "SSL error connecting %s: %s\n", sock->name, X509_verify_cert_error_string( err ) ); return -1; }