Mercurial > hg > nginx
comparison src/event/ngx_event_openssl.c @ 7871:5f765427c17a
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).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 01 Jun 2021 17:37:51 +0300 |
parents | fecf645ff2f8 |
children | 573bd30e46b4 6674a50cbb6c |
comparison
equal
deleted
inserted
replaced
7870:fecf645ff2f8 | 7871:5f765427c17a |
---|---|
3005 failed: | 3005 failed: |
3006 | 3006 |
3007 rc = NGX_ERROR; | 3007 rc = NGX_ERROR; |
3008 | 3008 |
3009 done: | 3009 done: |
3010 | |
3011 if (c->ssl->shutdown_without_free) { | |
3012 c->ssl->shutdown_without_free = 0; | |
3013 c->recv = ngx_recv; | |
3014 return rc; | |
3015 } | |
3010 | 3016 |
3011 SSL_free(c->ssl->connection); | 3017 SSL_free(c->ssl->connection); |
3012 c->ssl = NULL; | 3018 c->ssl = NULL; |
3013 c->recv = ngx_recv; | 3019 c->recv = ngx_recv; |
3014 | 3020 |