Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/ngx_http_lua_proxy_ssl_verifyby.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ngx_http_lua_proxy_ssl_verify_set_callback(ngx_conf_t *cf)
return NGX_ERROR;
}

#if (!defined SSL_ERROR_WANT_RETRY_VERIFY \
#if (!defined SSL_ERROR_WANT_RETRY_VERIFY \
|| OPENSSL_VERSION_NUMBER < 0x30000020L)

ngx_log_error(NGX_LOG_EMERG, cf->log, 0, "OpenSSL too old to support "
Expand Down Expand Up @@ -150,7 +150,7 @@ char *
ngx_http_lua_proxy_ssl_verify_by_lua(ngx_conf_t *cf, ngx_command_t *cmd,
void *conf)
{
#if (!defined SSL_ERROR_WANT_RETRY_VERIFY \
#if (!defined SSL_ERROR_WANT_RETRY_VERIFY \
|| OPENSSL_VERSION_NUMBER < 0x30000020L)

/* SSL_set_retry_verify() was added in OpenSSL 3.0.2 */
Expand Down Expand Up @@ -339,7 +339,8 @@ ngx_http_lua_proxy_ssl_verify_handler(X509_STORE_CTX *x509_store, void *arg)

ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
"proxy_ssl_verify_by_lua: handler return value: %i, "
"cert verify callback exit code: %d", rc, cctx->exit_code);
"cert verify callback exit code: %d", rc,
cctx->exit_code);

c->log->action = "proxy pass SSL handshaking";
return cctx->exit_code;
Expand Down Expand Up @@ -370,6 +371,7 @@ ngx_http_lua_proxy_ssl_verify_handler(X509_STORE_CTX *x509_store, void *arg)
return SSL_set_retry_verify(ssl_conn);

failed:

if (cctx && cctx->pool) {
ngx_destroy_pool(cctx->pool);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ngx_http_lua_ssl_certby.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ ngx_http_lua_ssl_cert_done(void *data)

#if (HAVE_QUIC_SSL_LUA_YIELD_PATCH && NGX_HTTP_V3)
# if OPENSSL_VERSION_NUMBER >= 0x1000205fL
# if (NGX_QUIC_OPENSSL_COMPAT)
# if (NGX_QUIC_OPENSSL_COMPAT || NGX_QUIC_OPENSSL_API)
ngx_http_lua_resume_quic_ssl_handshake(c);
# endif
# endif
Expand Down
2 changes: 1 addition & 1 deletion src/ngx_http_lua_ssl_client_helloby.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ ngx_http_lua_ssl_client_hello_done(void *data)

#if (HAVE_QUIC_SSL_LUA_YIELD_PATCH && NGX_HTTP_V3)
# if defined(SSL_ERROR_WANT_CLIENT_HELLO_CB)
# if (NGX_QUIC_OPENSSL_COMPAT)
# if (NGX_QUIC_OPENSSL_COMPAT || NGX_QUIC_OPENSSL_API)
ngx_http_lua_resume_quic_ssl_handshake(c);
# endif
# endif
Expand Down
1 change: 1 addition & 0 deletions src/ngx_http_lua_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,7 @@ ngx_http_lua_run_thread(lua_State *L, ngx_http_request_t *r,
NGX_ERROR : NGX_HTTP_INTERNAL_SERVER_ERROR;

done:

#ifdef HAVE_PROXY_SSL_PATCH
if (ctx->context == NGX_HTTP_LUA_CONTEXT_PROXY_SSL_VERIFY) {
return NGX_OK;
Expand Down