fffonion / lua-resty-openssl

FFI-based OpenSSL binding for OpenResty
BSD 2-Clause "Simplified" License
130 stars 43 forks source link

nginx: [error] init_by_lua error: resty.openssl.auxiliary.nginx doesn't support Nginx version 1026000 #161

Closed JIFVGWHvAseSovQ closed 4 months ago

JIFVGWHvAseSovQ commented 4 months ago
nginx: [error] init_by_lua error: resty.openssl.auxiliary.nginx doesn't support Nginx version 1026000
  | stack traceback:
  |   [C]: in function 'error'
  |   /usr/local/lib/resty/openssl/auxiliary/nginx.lua:128: in main chunk
  |   [C]: in function 'require'
  |   /usr/local/lib/resty/openssl/ssl_ctx.lua:9: in main chunk
  |   [C]: in function 'require'
  |   /usr/local/lib/resty/acme/challenge/tls-alpn-01.lua:11: in main chunk
  |   [C]: in function 'require'
  |   /usr/local/lib/resty/acme/client.lua:115: in function 'new'
  |   /usr/local/lib/resty/acme/autossl.lua:471: in function 'init'
  |   init_by_lua(waf/init.conf:1):15: in main chunk.

F5 nginx: https://nginx.org/en/download.html
free nginx: https://freenginx.org/en/download.html
fffonion commented 4 months ago

Hi @JIFVGWHvAseSovQ , please compile https://github.com/fffonion/lua-resty-openssl-aux-module.

JIFVGWHvAseSovQ commented 4 months ago
   if ngx_version == 1017008 or ngx_version == 1019003 or ngx_version == 1019009 
    or ngx_version == 1021004 or (not ngx_has_http_v3 and ngx_version == 1025003) then
    -- 1.17.8, 1.19.3, 1.19.9, 1.21.4, 1.25.3

   elseif ngx_has_http_v3 and ngx_version == 1025003 then
    -- 1.25.3

resty.openssl.auxiliary.nginx Only supports 1.25.3

fffonion commented 4 months ago

This code is only activated when you don't have lua-resty-openssl-aux-module compiled, e.g. the debug mode. It's also not indented for production use too. So you will need to compile that module after all.

fffonion commented 4 months ago

I will update the error message to be more descriptive.