Skip to content

Commit e4298cb

Browse files
committed
macro to conditional build proxy ssl verify
1 parent bfdc5a3 commit e4298cb

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

src/ngx_http_lua_proxy_ssl_verifyby.c

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
#include "ngx_http_lua_util.h"
1717
#include "ngx_http_ssl_module.h"
1818
#include "ngx_http_lua_contentby.h"
19-
#include "ngx_http_lua_proxy_ssl_verifyby.h"
2019
#include "ngx_http_lua_directive.h"
2120
#include "ngx_http_lua_ssl.h"
2221

22+
#ifdef HAVE_PROXY_SSL_PATCH
23+
#include "ngx_http_lua_proxy_ssl_verifyby.h"
24+
2325

2426
static void ngx_http_lua_proxy_ssl_verify_done(void *data);
2527
static void ngx_http_lua_proxy_ssl_verify_aborted(void *data);
@@ -708,4 +710,42 @@ ngx_http_lua_ffi_ssl_get_verify_cert(ngx_http_request_t *r, char **err)
708710
#endif
709711
}
710712

713+
714+
#else /* HAVE_PROXY_SSL_PATCH */
715+
716+
717+
int
718+
ngx_http_lua_ffi_ssl_set_verify_result(ngx_http_request_t *r,
719+
int verify_result, char **err)
720+
{
721+
*err = "Does not have HAVE_PROXY_SSL_PATCH to support this function";
722+
723+
return NGX_ERROR;
724+
}
725+
726+
727+
int
728+
ngx_http_lua_ffi_ssl_get_verify_result(ngx_http_request_t *r, char **err)
729+
{
730+
*err = "Does not have HAVE_PROXY_SSL_PATCH to support this function";
731+
732+
return NGX_ERROR;
733+
}
734+
735+
736+
void
737+
ngx_http_lua_ffi_ssl_free_verify_cert(void *cdata)
738+
{
739+
}
740+
741+
742+
void *
743+
ngx_http_lua_ffi_ssl_get_verify_cert(ngx_http_request_t *r, char **err)
744+
{
745+
*err = "Does not have HAVE_PROXY_SSL_PATCH to support this function";
746+
747+
return NULL;
748+
}
749+
750+
#endif /* HAVE_PROXY_SSL_PATCH */
711751
#endif /* NGX_HTTP_SSL */

0 commit comments

Comments
 (0)