summaryrefslogtreecommitdiffhomepage
path: root/src/event/ngx_event_openssl.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2021-06-01 17:37:51 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2021-06-01 17:37:51 +0300
commit5eadaf69e394c030056e4190d86dae0262f8617c (patch)
treea04db9e5af7194a87d75cff338fb6d086d05ad64 /src/event/ngx_event_openssl.c
parent235d2df1de6aba77db3d128c0c637c9d2e9a9d12 (diff)
downloadnginx-5eadaf69e394c030056e4190d86dae0262f8617c.tar.gz
nginx-5eadaf69e394c030056e4190d86dae0262f8617c.tar.bz2
Fixed SSL logging with lingering close.
Recent fixes to SSL shutdown with lingering close (554c6ae25ffc, 1.19.5) broke logging of SSL variables. To make sure logging of SSL variables works properly, avoid freeing c->ssl when doing an SSL shutdown before lingering close. Reported by Reinis Rozitis (http://mailman.nginx.org/pipermail/nginx/2021-May/060670.html).
Diffstat (limited to '')
-rw-r--r--src/event/ngx_event_openssl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index 06357834c..396cc22b3 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -3008,6 +3008,12 @@ failed:
done:
+ if (c->ssl->shutdown_without_free) {
+ c->ssl->shutdown_without_free = 0;
+ c->recv = ngx_recv;
+ return rc;
+ }
+
SSL_free(c->ssl->connection);
c->ssl = NULL;
c->recv = ngx_recv;