Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archlinux EVP_PKEY_size error #54

Closed
transtone opened this issue Jan 5, 2024 · 8 comments
Closed

archlinux EVP_PKEY_size error #54

transtone opened this issue Jan 5, 2024 · 8 comments

Comments

@transtone
Copy link

2024/01/05 11:02:43 [error] 5776#0: *1 lua entry thread aborted: runtime error: 
/opt/openresty/site/lualib/resty/rsa.lua:388: 
/opt/openresty/luajit/lib/libluajit-5.1.so.2: undefined symbol: EVP_PKEY_size
@spacewander
Copy link
Owner

What OpenSSL version used in your system? Seems it doesn't export the method EVP_PKEY_size.

@Amitesh21
Copy link

Hey @spacewander, I am also seeing the same error. We were using the Openssl v1.1.1r with openresty v1.25.3.1 but seems like openssl 1.1.1 is deprecated now. I am trying to bump openssl to v3.2.1, are the new release changes not legacy compatible? Any sample or doc you can share to fix the issue? Thanks.

@spacewander
Copy link
Owner

According to https://www.openssl.org/docs/manmaster/man3/EVP_PKEY_size.html, EVP_PKEY_size is renamed to EVP_PKEY_get_size. Would you give it a try?

@nogolang
Copy link
Contributor

nogolang commented Nov 4, 2024

you should edit rsa.lua in /usr/local/openssl/lualib/resty/rsa.lua

int EVP_PKEY_size(EVP_PKEY *pkey);
--new version is updated EVP_PKEY_get_size,but you need keep old define
int EVP_PKEY_get_size(EVP_PKEY *pkey);
--update this code
--local size = C.EVP_PKEY_size(pkey)
local size = C.EVP_PKEY_get_size(pkey)

--then you can fix it

@spacewander
Copy link
Owner

@nogolang
Would you submit a PR for this? Thanks!

@spacewander
Copy link
Owner

We can use pcall to check if the method is defined:

if not pcall(function () return C.EVP_MD_CTX_create end) then

@nogolang
Copy link
Contributor

nogolang commented Nov 4, 2024

@nogolang Would you submit a PR for this? Thanks!

ok,i try

@spacewander
Copy link
Owner

Fixed in #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants