Mercurial > hg > nginx
comparison src/event/ngx_event_openssl.c @ 8065:0ce2d7a520be
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 07 Sep 2022 00:44:10 +0300 |
parents | 9cf231508a8d |
children | 0546ab9351c8 |
comparison
equal
deleted
inserted
replaced
8064:5f5a34e83ca2 | 8065:0ce2d7a520be |
---|---|
1424 * does for ciphers. | 1424 * does for ciphers. |
1425 */ | 1425 */ |
1426 | 1426 |
1427 SSL_CTX_set_options(ssl->ctx, SSL_OP_SINGLE_ECDH_USE); | 1427 SSL_CTX_set_options(ssl->ctx, SSL_OP_SINGLE_ECDH_USE); |
1428 | 1428 |
1429 #if SSL_CTRL_SET_ECDH_AUTO | 1429 #ifdef SSL_CTRL_SET_ECDH_AUTO |
1430 /* not needed in OpenSSL 1.1.0+ */ | 1430 /* not needed in OpenSSL 1.1.0+ */ |
1431 SSL_CTX_set_ecdh_auto(ssl->ctx, 1); | 1431 SSL_CTX_set_ecdh_auto(ssl->ctx, 1); |
1432 #endif | 1432 #endif |
1433 | 1433 |
1434 if (ngx_strcmp(name->data, "auto") == 0) { | 1434 if (ngx_strcmp(name->data, "auto") == 0) { |