lua-resty-session icon indicating copy to clipboard operation
lua-resty-session copied to clipboard

Issue with OpenSSL (digest.new: failed to create EVP_MD_CTX)

Open Videl opened this issue 10 months ago • 0 comments

Hello,

I had this issue:

2025/04/01 12:21:31 [error] 1042#1042: *325998 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/session.lua:2564: digest.new: failed to create EVP_MD_CTX
stack traceback:
coroutine 0:
    [C]: in function 'assert'
    /usr/local/share/lua/5.1/resty/session.lua:2564: in function 'new'
    /usr/local/share/lua/5.1/resty/session.lua:2693: in function 'open'
    /usr/local/share/lua/5.1/resty/session.lua:2724: in function 'start'
    /usr/local/share/lua/5.1/resty/openidc.lua:1518: in function 'authenticate'
    access_by_lua(nginx_openidc_config:91):42: in main chunk, client: <client ip>, server: <host>, request: "GET / HTTP/2.0", host: "<host>"

The issue seems to come from Ubuntu package openresty-openssl3 which as been updated from 3.0.15-1~jammy1 to 3.4.1-1~jammy1. Reverting the package makes it work again but I went a little bit deeper and tried to keep the latest version of openresty-openssl3 instead.

Apparently the new minimum version of lua-resty-openssl needed for this package openresty-openssl3 to be updated to the latest version as of today needs to be >= 1.0.0 (instead of the current lua-resty-openssl >= 0.8.0). I tried with this:

luarocks install lua-resty-openssl 1.0.0
openresty -s reload

FYI, it also worked with its latest version 1.5.2. I'm not sure how to make all the changes to make a working release, but I can at least make the change in the rockspec file if needed.

Videl avatar Apr 01 '25 15:04 Videl