From cc6eeae2d288ad7b278ae7425f30cde57b813b64 Mon Sep 17 00:00:00 2001 From: spacewander Date: Fri, 11 Jun 2021 09:19:09 +0800 Subject: [PATCH] feature: allow to be compiled with LibreSSL 3.0+ --- src/subsys/ngx_subsys_lua_ssl_certby.c.tt2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/subsys/ngx_subsys_lua_ssl_certby.c.tt2 b/src/subsys/ngx_subsys_lua_ssl_certby.c.tt2 index 7a7a12b..03fa7eb 100644 --- a/src/subsys/ngx_subsys_lua_ssl_certby.c.tt2 +++ b/src/subsys/ngx_subsys_lua_ssl_certby.c.tt2 @@ -1404,6 +1404,13 @@ int ngx_[% subsys %]_lua_ffi_ssl_verify_client([% req_type %] *r, void *ca_certs, int depth, char **err) { +#ifdef LIBRESSL_VERSION_NUMBER + + *err = "LibreSSL not supported"; + return NGX_ERROR; + +#else + ngx_[% subsys %]_lua_ctx_t *ctx; ngx_ssl_conn_t *ssl_conn; [% IF http_subsys %] @@ -1535,6 +1542,7 @@ failed: X509_STORE_free(ca_store); return NGX_ERROR; +#endif }