Skip to content

Commit 9f1b459

Browse files
bugfix: failed to build with openssl < 3.0.2.
1 parent 529dc7a commit 9f1b459

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/ngx_http_lua_proxy_ssl_verifyby.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323
#include "ngx_http_lua_proxy_ssl_verifyby.h"
2424

2525

26+
#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x30000020uL)
2627
static void ngx_http_lua_proxy_ssl_verify_done(void *data);
2728
static void ngx_http_lua_proxy_ssl_verify_aborted(void *data);
29+
#endif
2830
static ngx_int_t ngx_http_lua_proxy_ssl_verify_by_chunk(lua_State *L,
2931
ngx_http_request_t *r);
3032

@@ -275,6 +277,12 @@ ngx_http_lua_proxy_ssl_verify_handler(X509_STORE_CTX *x509_store, void *arg)
275277
"BoringSSL does not support by proxy_ssl_verify_by_lua*");
276278

277279
return 1;
280+
#elif defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER < 0x30000020uL)
281+
282+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0,
283+
"OpenSSL(< 3.0.2) does not support by proxy_ssl_verify_by_lua*");
284+
285+
return 1;
278286

279287
#else
280288

@@ -423,6 +431,7 @@ ngx_http_lua_proxy_ssl_verify_handler(X509_STORE_CTX *x509_store, void *arg)
423431
}
424432

425433

434+
#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x30000020uL)
426435
static void
427436
ngx_http_lua_proxy_ssl_verify_done(void *data)
428437
{
@@ -482,6 +491,7 @@ ngx_http_lua_proxy_ssl_verify_aborted(void *data)
482491
cctx->pool = NULL;
483492
}
484493
}
494+
#endif
485495

486496

487497
static ngx_int_t

0 commit comments

Comments
 (0)