projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abb6bd7
)
OpenSSL ssl_recv_data(): Include the actual fd in an error message
author
Fabian Keil
<fk@fabiankeil.de>
Tue, 12 Jan 2021 08:38:50 +0000
(09:38 +0100)
committer
Fabian Keil
<fk@fabiankeil.de>
Wed, 13 Jan 2021 08:58:17 +0000
(09:58 +0100)
openssl.c
patch
|
blob
|
history
diff --git
a/openssl.c
b/openssl.c
index
e87e997
..
cfcc59e
100644
(file)
--- 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);