Welcome! Log In Create A New Profile

Advanced

[nginx] SSL: fixed incorrect usage of #if instead of #ifdef.

Sergey Kandaurov
September 07, 2022 08:38AM
details: https://hg.nginx.org/nginx/rev/0ce2d7a520be
branches:
changeset: 8065:0ce2d7a520be
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Sep 07 00:44:10 2022 +0300
description:
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.

diffstat:

src/event/ngx_event_openssl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 5f5a34e83ca2 -r 0ce2d7a520be src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c Wed Sep 07 00:43:51 2022 +0300
+++ b/src/event/ngx_event_openssl.c Wed Sep 07 00:44:10 2022 +0300
@@ -1426,7 +1426,7 @@ ngx_ssl_ecdh_curve(ngx_conf_t *cf, ngx_s

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
_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[nginx] SSL: fixed incorrect usage of #if instead of #ifdef.

Sergey Kandaurov 150 September 07, 2022 08:38AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 163
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready