Hi,
I'm facing some problems during jwt verification, which manifests itself as:
< HTTP/1.1 500 Internal Server Error < Server: openresty/1.21.4.1
(in openresty logs):
2023/06/19 20:44:32 [error] 1410#1410: *2 lua entry thread aborted: runtime error: /usr/local/openresty/site/lualib/resty/evp.lua:216: /usr/local/openresty/luajit/lib/libluajit-5.1.so.2: undefined symbol: EVP_MD_CTX_create stack traceback: coroutine 0: [C]: in function '__index' /usr/local/openresty/site/lualib/resty/evp.lua:216: in function 'verify' /usr/local/openresty/site/lualib/resty/jwt.lua:812: in function 'verify' access_by_lua(nginx.conf:89):30: in main chunk, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost"
My stack:
Openresty version :
apt-cache policy openresty openresty: Installed: 1.21.4.1-1~focal1
lua-resty-jwt:
opm info lua-resty-jwt Name : lua-resty-jwt Version : 0.1.11
lua-resty-hmac:
opm info lua-resty-hmac Name : lua-resty-hmac Version : 0.06
OS:
lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal
openssl
openssl OpenSSL> version OpenSSL 1.1.1f 31 Mar 2020
lua code :
`
location / {
access_by_lua_block {
local jwt = require("resty.jwt")
local auth_header = ngx.var.http_Authorization
local token
local key = [[ -----BEGIN PUBLIC KEY-----
<PUBLIC>
-----END PUBLIC KEY-----
]]
if auth_header then
token = string.match(auth_header, "Bearer%s+(.+)")
end
local verified = jwt:verify(key, token)
if not verified then
ngx.exit(ngx.HTTP_UNAUTHORIZED)`
==================
It looks similar as old issue with openssl1.1:
zmartzone/lua-resty-openidc#161
zmartzone/lua-resty-openidc#162
I there anybody who had similar problem ?
Or maybe I'm doing something wrong ...
Hi,
I'm facing some problems during jwt verification, which manifests itself as:
< HTTP/1.1 500 Internal Server Error < Server: openresty/1.21.4.1(in openresty logs):
2023/06/19 20:44:32 [error] 1410#1410: *2 lua entry thread aborted: runtime error: /usr/local/openresty/site/lualib/resty/evp.lua:216: /usr/local/openresty/luajit/lib/libluajit-5.1.so.2: undefined symbol: EVP_MD_CTX_create stack traceback: coroutine 0: [C]: in function '__index' /usr/local/openresty/site/lualib/resty/evp.lua:216: in function 'verify' /usr/local/openresty/site/lualib/resty/jwt.lua:812: in function 'verify' access_by_lua(nginx.conf:89):30: in main chunk, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost"My stack:
Openresty version :
apt-cache policy openresty openresty: Installed: 1.21.4.1-1~focal1lua-resty-jwt:
opm info lua-resty-jwt Name : lua-resty-jwt Version : 0.1.11lua-resty-hmac:
opm info lua-resty-hmac Name : lua-resty-hmac Version : 0.06OS:
lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focalopenssl
openssl OpenSSL> version OpenSSL 1.1.1f 31 Mar 2020lua code :
`
location / {
==================
It looks similar as old issue with openssl1.1:
zmartzone/lua-resty-openidc#161
zmartzone/lua-resty-openidc#162
I there anybody who had similar problem ?
Or maybe I'm doing something wrong ...