X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=openssl.c;h=cfcc59e8b1efa6bbce978e8708abe654ba7ed1c5;hp=e87e997b4745154363d1313dae845b403dd5d376;hb=786606e85a69bd33ee57f81bcbd5965b23b331c8;hpb=abb6bd71eab61ad3a0541ab42ba1466e95504dd2 diff --git a/openssl.c b/openssl.c index e87e997b..cfcc59e8 100644 --- a/openssl.c +++ b/openssl.c @@ -229,6 +229,11 @@ extern int ssl_recv_data(struct ssl_attr *ssl_attr, unsigned char *buf, size_t m ret = BIO_read(bio, buf, (int)max_length); } while (ret <= 0 && BIO_should_retry(bio)); + if (BIO_get_ssl(bio, &ssl) == 1) + { + fd = SSL_get_fd(ssl); + } + if (ret < 0) { log_ssl_errors(LOG_LEVEL_ERROR, @@ -237,11 +242,6 @@ extern int ssl_recv_data(struct ssl_attr *ssl_attr, unsigned char *buf, size_t m return -1; } - if (BIO_get_ssl(bio, &ssl) == 1) - { - fd = SSL_get_fd(ssl); - } - log_error(LOG_LEVEL_RECEIVED, "TLS from socket %d: %N", fd, ret, buf);