Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] SSL: mark connections as non-reusable before SSL handshake

Piotr Sikora
June 22, 2015 05:34PM
Hey Maxim,

> As far as I understand, this change isn't useable with an
> unmodified nginx

It is, since nginx modules are free to install those SSL callbacks
(for example: ngx_lua's ssl_certificate_by_lua).

> (and introduces some minor pessimization in an
> unlikely case when first ngx_ssl_handshake() will not return
> NGX_AGAIN).

Since SSL/TLS handshake requires at least 1 RTT (even in case of
session resumption), the only case in which ngx_ssl_handshake()
wouldn't return NGX_AGAIN is when the handshake failed based on
ClientHello (no shared ciphers, inappropriate fallback, etc.), in
which case the connection will be closed and
ngx_reusable_connection(c, 0) will be called from
ngx_close_connection() anyway.

Calling ngx_reusable_connection(c, 0) twice is basically a no-op, so I
don't really consider this a pessimization.

Best regards,
Piotr Sikora

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] SSL: mark connections as non-reusable before SSL handshake

Piotr Sikora 864 June 18, 2015 06:44AM

Re: [PATCH] SSL: mark connections as non-reusable before SSL handshake

Maxim Dounin 344 June 21, 2015 09:26AM

Re: [PATCH] SSL: mark connections as non-reusable before SSL handshake

Piotr Sikora 360 June 22, 2015 05:34PM



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

Online Users

Guests: 295
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