]> git.kaiwu.me - nginx.git/commitdiff
SSL: fixed incorrect usage of #if instead of #ifdef.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 6 Sep 2022 21:44:10 +0000 (00:44 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 6 Sep 2022 21:44:10 +0000 (00:44 +0300)
In 2014ed60f17f, "#if SSL_CTRL_SET_ECDH_AUTO" test was incorrectly used
instead of "#ifdef SSL_CTRL_SET_ECDH_AUTO".  There is no practical
difference, since SSL_CTRL_SET_ECDH_AUTO evaluates to a non-zero numeric
value when defined, but anyway it's better to correctly test if the value
is defined.

src/event/ngx_event_openssl.c

index bbeb5f0c5775b0c04aedf832ae9f1bc0350a9123..a95eec05d0e28184c0a6cd2ab64a69e9c762e24b 100644 (file)
@@ -1426,7 +1426,7 @@ ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *name)
 
     SSL_CTX_set_options(ssl->ctx, SSL_OP_SINGLE_ECDH_USE);
 
-#if SSL_CTRL_SET_ECDH_AUTO
+#ifdef SSL_CTRL_SET_ECDH_AUTO
     /* not needed in OpenSSL 1.1.0+ */
     SSL_CTX_set_ecdh_auto(ssl->ctx, 1);
 #endif