spacewander / lua-resty-rsa

RSA encrypt/decrypt & sign/verify for OpenResty/LuaJIT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

有时候会一直报 Unknown message digest

hpointer opened this issue · comments

环境
openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

openresty version
nginx version: openresty/1.15.8.1rc1

代码
local algorithm = "SHA256"
local priv, err = resty_rsa:new({ private_key = private_key, algorithm = algorithm })

会报这个错是因为 OpenSSL 不支持给定的算法。
一个算法,OpenSSL 要不支持要不不支持,一般不会出现“有时候”不支持的情况。
你确认下是否存在 algorithm 有时候不是预期的值的情况?

我这边需要可以稳定重现的用例才能排查是否 lua-resty-rsa 的问题,只看现在几行代码是无从下定论的。