Skip to content

Conversation

@spacewander
Copy link
Member

Fix #1833

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.

@spacewander spacewander marked this pull request as ready for review June 10, 2021 08:59
@spacewander spacewander merged commit 6ed8e4b into openresty:master Jun 10, 2021
@spacewander spacewander deleted the lsvt branch June 10, 2021 12:56
@Firegarden
Copy link

I deleted my previous comment - I am sorry I did not understand that a recent declaration was added to the source code and so I re-tested a compile using git clone instead of tag and there is a new error as follows

ngx_http_lua_ssl_certby.c:1337:1: error: ‘ngx_http_lua_ssl_verify_callback’ defined but not used [-Werror=unused-function]

Any thoughts on how to get this to compile?

Thank you.

Error info as follows:

cc -c -I/usr/local/include/luajit-2.1/ -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -Wno-ignored-qualifiers -D_GLIBCXX_USE_CXX11_ABI=0 -Wno-deprecated-declarations -DNDK_SET_VAR -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/local/src/nginx/modules/ngx_devel_kit-0.3.1/objs -I objs/addon/ndk -I /usr/local/src/nginx/modules/lua-nginx-module/src/api -I /usr/local/src/nginx/modules/libressl-3.3.3/.openssl/include -I o> -o objs/addon/src/ngx_http_lua_ssl_ocsp.o \ /usr/local/src/nginx/modules/lua-nginx-module/src/ngx_http_lua_ssl_ocsp.c /usr/local/src/nginx/modules/lua-nginx-module/src/ngx_http_lua_ssl_certby.c:1337:1: error: ‘ngx_http_lua_ssl_verify_callback’ defined but not used [-Werror=unused-function] 1337 | ngx_http_lua_ssl_verify_callback(int ok, X509_STORE_CTX *x509_store) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [objs/Makefile:2238: objs/addon/src/ngx_http_lua_ssl_certby.o] Error 1

@spacewander
Copy link
Member Author

You can add #ifdef LIBRESSL_VERSION_NUMBER to exclude the ngx_http_lua_ssl_verify_callback definition.
PR is welcome!

@Firegarden
Copy link

Firegarden commented Jun 24, 2021

I tested this and yes it compiles fine with one small difference - you actually want to use #ifndef on line 1336 of ngx_http_lua_ssl_certby.c and yes it will compile fine.

eg

#ifndef LIBRESSL_VERSION_NUMBER static int ngx_http_lua_ssl_verify_callback(int ok, X509_STORE_CTX *x509_store) { /* * we never terminate handshake here and user can later use * $ssl_client_verify to check verification result. * * this is consistent with Nginx behavior. */ return 1; } #endif

@spacewander
Copy link
Member Author

Yes, I submit a PR for it: #1894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module Does Not Compile with LibreSSL 3.0+

3 participants