From: Maxim Dounin Date: Tue, 6 Sep 2022 21:44:10 +0000 (+0300) Subject: SSL: fixed incorrect usage of #if instead of #ifdef. X-Git-Tag: release-1.23.2~25 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=116a744799cf46916d1add01ad764718b7c53e9b;p=nginx.git SSL: fixed incorrect usage of #if instead of #ifdef. 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. --- diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index bbeb5f0c5..a95eec05d 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -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