]> git.kaiwu.me - nginx.git/commitdiff
SSL: fixed build with OPENSSL_NO_DH.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 16 Apr 2025 16:58:57 +0000 (20:58 +0400)
committerpluknet <pluknet@nginx.com>
Fri, 25 Apr 2025 10:56:31 +0000 (14:56 +0400)
src/event/ngx_event_openssl.c
src/event/ngx_event_openssl.h

index 6992cc4a4697d49304413ea90e101ed07e13dce8..7eb05209dd67040274b558d0c9141158dd88523b 100644 (file)
@@ -1315,6 +1315,8 @@ ngx_ssl_passwords_cleanup(void *data)
 ngx_int_t
 ngx_ssl_dhparam(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *file)
 {
+#ifndef OPENSSL_NO_DH
+
     BIO  *bio;
 
     if (file->len == 0) {
@@ -1385,6 +1387,8 @@ ngx_ssl_dhparam(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *file)
 
     BIO_free(bio);
 
+#endif
+
     return NGX_OK;
 }
 
index 9ba21a810645128cf5484a04b3c478a2625a2731..d4a62b82a66079672a1b0093c3eb141fcfe9b8d1 100644 (file)
@@ -19,7 +19,9 @@
 #include <openssl/bn.h>
 #include <openssl/conf.h>
 #include <openssl/crypto.h>
+#ifndef OPENSSL_NO_DH
 #include <openssl/dh.h>
+#endif
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif