SSL: fixed build with OPENSSL_NO_DH.

This commit is contained in:
Sergey Kandaurov 2025-04-16 20:58:57 +04:00 committed by pluknet
parent 4f8bc0b282
commit adda704158
2 changed files with 6 additions and 0 deletions

View File

@ -1315,6 +1315,8 @@ ngx_ssl_passwords_cleanup(void *data)
ngx_int_t ngx_int_t
ngx_ssl_dhparam(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *file) ngx_ssl_dhparam(ngx_conf_t *cf, ngx_ssl_t *ssl, ngx_str_t *file)
{ {
#ifndef OPENSSL_NO_DH
BIO *bio; BIO *bio;
if (file->len == 0) { 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); BIO_free(bio);
#endif
return NGX_OK; return NGX_OK;
} }

View File

@ -19,7 +19,9 @@
#include <openssl/bn.h> #include <openssl/bn.h>
#include <openssl/conf.h> #include <openssl/conf.h>
#include <openssl/crypto.h> #include <openssl/crypto.h>
#ifndef OPENSSL_NO_DH
#include <openssl/dh.h> #include <openssl/dh.h>
#endif
#ifndef OPENSSL_NO_ENGINE #ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h> #include <openssl/engine.h>
#endif #endif