fix error handling of SSL_set_tlsext_host_name()

it is not one of the functions to be checked with SSL_get_error().

amends 17babc169.
This commit is contained in:
Oswald Buddenhagen 2019-07-28 13:33:12 +02:00
parent 6a874b5877
commit d0a8551703

View File

@ -317,8 +317,11 @@ socket_start_tls( conn_t *conn, void (*cb)( int ok, void *aux ) )
start_tls_p3( conn, 0 ); start_tls_p3( conn, 0 );
return; return;
} }
if (ssl_return( "set server name", conn, SSL_set_tlsext_host_name( conn->ssl, conn->conf->host ) ) < 0) if (!SSL_set_tlsext_host_name( conn->ssl, conn->conf->host )) {
print_ssl_errors( "setting SSL server host name" );
start_tls_p3( conn, 0 );
return; return;
}
if (!SSL_set_fd( conn->ssl, conn->fd )) { if (!SSL_set_fd( conn->ssl, conn->fd )) {
print_ssl_errors( "setting SSL socket fd" ); print_ssl_errors( "setting SSL socket fd" );
start_tls_p3( conn, 0 ); start_tls_p3( conn, 0 );