]> git.kaiwu.me - nginx.git/commitdiff
SSL: allowed renegotiation in client mode with OpenSSL < 1.1.0.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 3 May 2017 12:15:56 +0000 (15:15 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 3 May 2017 12:15:56 +0000 (15:15 +0300)
In ac9b1df5b246 (1.13.0) we attempted to allow renegotiation in client mode,
but when using OpenSSL 1.0.2 or older versions it was additionally disabled
by SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS.

src/event/ngx_event_openssl.c

index fdbd0c95d5f92f0538164f9845d6790dd301d521..2c4e11400c12789db99d7944cf3bd76f7f225cbb 100644 (file)
@@ -1300,7 +1300,7 @@ ngx_ssl_handshake(ngx_connection_t *c)
 #ifdef SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS
 
         /* initial handshake done, disable renegotiation (CVE-2009-3555) */
-        if (c->ssl->connection->s3) {
+        if (c->ssl->connection->s3 && SSL_is_server(c->ssl->connection)) {
             c->ssl->connection->s3->flags |= SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS;
         }