Skip to content

Commit c152081

Browse files
committed
ffi placeholder functions when building without HAVE_PROXY_SSL_PATCH
1 parent 8e345dd commit c152081

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

src/ngx_stream_lua_proxy_ssl_verifyby.c

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99

1010

1111
#if (NGX_STREAM_SSL)
12-
#ifdef HAVE_PROXY_SSL_PATCH
1312

1413
#include "ngx_stream_lua_cache.h"
1514
#include "ngx_stream_lua_initworkerby.h"
1615
#include "ngx_stream_lua_util.h"
1716
#include "ngx_stream_ssl_module.h"
1817
#include "ngx_stream_lua_contentby.h"
19-
#include "ngx_stream_lua_proxy_ssl_verifyby.h"
2018
#include "ngx_stream_lua_directive.h"
2119
#include "ngx_stream_lua_ssl.h"
2220

21+
#ifdef HAVE_PROXY_SSL_PATCH
22+
#include "ngx_stream_lua_proxy_ssl_verifyby.h"
23+
2324

2425
static void ngx_stream_lua_proxy_ssl_verify_done(void *data);
2526
static void ngx_stream_lua_proxy_ssl_verify_aborted(void *data);
@@ -771,5 +772,44 @@ ngx_stream_lua_ffi_ssl_get_verify_cert(ngx_stream_lua_request_t *r, char **err)
771772
#endif
772773
}
773774

775+
776+
#else /* HAVE_PROXY_SSL_PATCH */
777+
778+
779+
int
780+
ngx_stream_lua_ffi_ssl_set_verify_result(ngx_stream_lua_request_t *r,
781+
int verify_result, char **err)
782+
{
783+
*err = "Does not have HAVE_PROXY_SSL_PATCH to support this function";
784+
785+
return NGX_ERROR;
786+
}
787+
788+
789+
int
790+
ngx_stream_lua_ffi_ssl_get_verify_result(ngx_stream_lua_request_t *r,
791+
char **err)
792+
{
793+
*err = "Does not have HAVE_PROXY_SSL_PATCH to support this function";
794+
795+
return NGX_ERROR;
796+
}
797+
798+
799+
void
800+
ngx_stream_lua_ffi_ssl_free_verify_cert(void *)
801+
{
802+
}
803+
804+
805+
void *
806+
ngx_stream_lua_ffi_ssl_get_verify_cert(ngx_stream_lua_request_t *r, char **err)
807+
{
808+
*err = "Does not have HAVE_PROXY_SSL_PATCH to support this function";
809+
810+
return NULL;
811+
}
812+
813+
774814
#endif /* HAVE_PROXY_SSL_PATCH */
775815
#endif /* NGX_STREAM_SSL */

0 commit comments

Comments
 (0)