Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed log action when using SSL certificates with variables.

Maxim Dounin
May 24, 2021 11:26AM
details: https://hg.nginx.org/nginx/rev/1336a33cff33
branches:
changeset: 7847:1336a33cff33
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon May 24 18:23:42 2021 +0300
description:
Fixed log action when using SSL certificates with variables.

When variables are used in ssl_certificate or ssl_certificate_key, a request
is created in the certificate callback to evaluate the variables, and then
freed. Freeing it, however, updates c->log->action to "closing request",
resulting in confusing error messages like "client timed out ... while
closing request" when a client times out during the SSL handshake.

Fix is to restore c->log->action after calling ngx_http_free_request().

diffstat:

src/http/ngx_http_request.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 2ab7b55ae4a0 -r 1336a33cff33 src/http/ngx_http_request.c
--- a/src/http/ngx_http_request.c Thu May 20 19:59:16 2021 +0300
+++ b/src/http/ngx_http_request.c Mon May 24 18:23:42 2021 +0300
@@ -1043,12 +1043,14 @@ ngx_http_ssl_certificate(ngx_ssl_conn_t
}

ngx_http_free_request(r, 0);
+ c->log->action = "SSL handshaking";
c->destroyed = 0;
return 1;

failed:

ngx_http_free_request(r, 0);
+ c->log->action = "SSL handshaking";
c->destroyed = 0;
return 0;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Fixed log action when using SSL certificates with variables.

Maxim Dounin 288 May 24, 2021 11:26AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 213
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready