From: Fabian Keil Date: Sat, 29 Feb 2020 20:13:58 +0000 (+0100) Subject: Simplify code in handle_established_connection() X-Git-Tag: v_3_0_29~423 X-Git-Url: http://www.privoxy.org/gitweb/?a=commitdiff_plain;h=d56fd8c8f256e739ca3f1a077e9c806874595af6;p=privoxy.git Simplify code in handle_established_connection() Sponsored by: Robert Klemme --- diff --git a/jcc.c b/jcc.c index 614c7f18..feab1acf 100644 --- a/jcc.c +++ b/jcc.c @@ -2666,35 +2666,10 @@ static void handle_established_connection(struct client_state *csp) #endif /* def FEATURE_CONNECTION_KEEP_ALIVE */ #ifdef FEATURE_HTTPS_INSPECTION - /* - * Reading data from standard or secured connection (HTTP/HTTPS) - */ if (client_use_ssl(csp)) { - /* - * Receiving HTTP request from client over TLS/SSL and sending - * it to server over TLS/SSL. - */ - len = ssl_recv_data(&(csp->mbedtls_client_attr.ssl), - (unsigned char *)csp->receive_buffer, (size_t)max_bytes_to_read); - - if (len <= 0) - { - mark_server_socket_tainted(csp); - break; - } - - ret = ssl_send_data(&(csp->mbedtls_server_attr.ssl), - (const unsigned char *)csp->receive_buffer, (size_t)len); - - if (ret < 0) - { - log_error(LOG_LEVEL_ERROR, - "Send request over TLS/SSL to: %s failed", http->host); - mark_server_socket_tainted(csp); - close_client_and_server_ssl_connections(csp); - return; - } + log_error(LOG_LEVEL_CONNECT, "Breaking with TLS/SSL."); + break; } else #endif /* def FEATURE_HTTPS_INSPECTION */