3030#include "ngx_stream_lua_semaphore.h"
3131#include "ngx_stream_lua_ssl_client_helloby.h"
3232#include "ngx_stream_lua_ssl_certby.h"
33+
34+ #ifdef HAVE_PROXY_SSL_PATCH
3335#include "ngx_stream_lua_proxy_ssl_verifyby.h"
36+ #endif
3437
3538
3639#include "ngx_stream_lua_prereadby.h"
@@ -423,6 +426,7 @@ static ngx_command_t ngx_stream_lua_cmds[] = {
423426 0 ,
424427 (void * ) ngx_stream_lua_ssl_cert_handler_file },
425428
429+ #ifdef HAVE_PROXY_SSL_PATCH
426430 /* same context as proxy_pass directive */
427431 { ngx_string ("proxy_ssl_verify_by_lua_block" ),
428432 NGX_STREAM_SRV_CONF |NGX_CONF_BLOCK |NGX_CONF_NOARGS ,
@@ -445,6 +449,7 @@ static ngx_command_t ngx_stream_lua_cmds[] = {
445449 offsetof(ngx_stream_lua_srv_conf_t ,
446450 ups .upstream_skip_openssl_default_verify ),
447451 NULL },
452+ #endif
448453
449454 { ngx_string ("lua_ssl_verify_depth" ),
450455 NGX_STREAM_MAIN_CONF |NGX_STREAM_SRV_CONF |NGX_CONF_TAKE1 ,
@@ -895,7 +900,9 @@ ngx_stream_lua_create_srv_conf(ngx_conf_t *cf)
895900 conf -> ssl_verify_depth = NGX_CONF_UNSET_UINT ;
896901 conf -> ssl_certificates = NGX_CONF_UNSET_PTR ;
897902 conf -> ssl_certificate_keys = NGX_CONF_UNSET_PTR ;
903+ #ifdef HAVE_PROXY_SSL_PATCH
898904 conf -> ups .upstream_skip_openssl_default_verify = NGX_CONF_UNSET ;
905+ #endif
899906#endif
900907
901908 return conf ;
@@ -1030,6 +1037,7 @@ ngx_stream_lua_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
10301037 NULL );
10311038#endif
10321039
1040+ #ifdef HAVE_PROXY_SSL_PATCH
10331041 if (conf -> ups .proxy_ssl_verify_src .len == 0 ) {
10341042 conf -> ups .proxy_ssl_verify_src = prev -> ups .proxy_ssl_verify_src ;
10351043 conf -> ups .proxy_ssl_verify_handler = prev -> ups .proxy_ssl_verify_handler ;
@@ -1044,6 +1052,7 @@ ngx_stream_lua_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
10441052
10451053 ngx_conf_merge_value (conf -> ups .upstream_skip_openssl_default_verify ,
10461054 prev -> ups .upstream_skip_openssl_default_verify , 0 );
1055+ #endif
10471056
10481057 if (ngx_stream_lua_set_ssl (cf , conf ) != NGX_OK ) {
10491058 return NGX_CONF_ERROR ;
0 commit comments