]> git.kaiwu.me - nginx.git/commitdiff
SSL: use of the SSL_OP_NO_CLIENT_RENEGOTIATION option.
authorMaxim Dounin <mdounin@mdounin.ru>
Sun, 3 Mar 2019 13:49:02 +0000 (16:49 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Sun, 3 Mar 2019 13:49:02 +0000 (16:49 +0300)
The SSL_OP_NO_CLIENT_RENEGOTIATION option was introduced in LibreSSL 2.5.1.
Unlike OpenSSL's SSL_OP_NO_RENEGOTIATION, it only disables client-initiated
renegotiation, and hence can be safely used on all SSL contexts.

src/event/ngx_event_openssl.c

index e18480c0dff4ba4660cc407e96d58838c358f1f9..987b381197616a9763d1e0bd71484f77992df8ff 100644 (file)
@@ -368,6 +368,10 @@ ngx_ssl_create(ngx_ssl_t *ssl, ngx_uint_t protocols, void *data)
     SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_ANTI_REPLAY);
 #endif
 
+#ifdef SSL_OP_NO_CLIENT_RENEGOTIATION
+    SSL_CTX_set_options(ssl->ctx, SSL_OP_NO_CLIENT_RENEGOTIATION);
+#endif
+
 #ifdef SSL_MODE_RELEASE_BUFFERS
     SSL_CTX_set_mode(ssl->ctx, SSL_MODE_RELEASE_BUFFERS);
 #endif