Welcome! Log In Create A New Profile

Advanced

[PATCH] Proxy: added timeout protection to SSL handshake.

Yichun Zhang (agentzh)
July 22, 2014 07:04PM
# HG changeset patch
# User Yichun Zhang <agentzh@gmail.com>
# Date 1406068295 25200
# Tue Jul 22 15:31:35 2014 -0700
# Node ID 1db962fc3522ce61313b684ca8251a6462992d40
# Parent 93614769dd4b6df8844c3c43c6a0b3f83bfa6746
Proxy: added timeout protection to SSL handshake.

Previously, proxy relied on the write event timer created when connect()
could not complete immediately to protect SSL handshake timeouts. But when
connect() can complete in a single run, there is no timer protection at all.

diff -r 93614769dd4b -r 1db962fc3522 src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c Sun May 11 21:56:07 2014 -0700
+++ b/src/http/ngx_http_upstream.c Tue Jul 22 15:31:35 2014 -0700
@@ -1387,6 +1387,7 @@ ngx_http_upstream_ssl_init_connection(ng
rc = ngx_ssl_handshake(c);

if (rc == NGX_AGAIN) {
+ ngx_add_timer(c->write, u->conf->connect_timeout);
c->ssl->handler = ngx_http_upstream_ssl_handshake;
return;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Proxy: added timeout protection to SSL handshake.

Yichun Zhang (agentzh) 702 July 22, 2014 07:04PM

Re: [PATCH] Proxy: added timeout protection to SSL handshake.

Maxim Dounin 330 July 23, 2014 10:12AM

Re: [PATCH] Proxy: added timeout protection to SSL handshake.

Yichun Zhang (agentzh) 290 July 23, 2014 03:02PM



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

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready