fix server certificate validation error reporting

use the right function to decode the error code.

found by Andrés Ramírez <sunshavi@fastmail.fm>.
This commit is contained in:
Oswald Buddenhagen 2016-05-21 13:08:09 +02:00
parent e054c575ea
commit 2648ef578f

View File

@ -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;
}