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

undefined symbol: EVP_MD_CTX_ new #60

Open
ejaysss opened this issue Dec 21, 2024 · 6 comments
Open

undefined symbol: EVP_MD_CTX_ new #60

ejaysss opened this issue Dec 21, 2024 · 6 comments

Comments

@ejaysss
Copy link

ejaysss commented Dec 21, 2024

After running the project I get the following error:
./rocks/share/tarantool/resty/rsa.lua:152: tarantool init.lua: my-app@s1-replica: undefined symbol: EVP_MD_CTX_newl

Centos 7
OpenSSL 1.0.2k-fips 26 Jan 2017
openssl-devel package and openssl are installed.

@spacewander
Copy link
Owner

It should be protected by the condition there:

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

Which version of lua-resty-rsa do you use?

@ejaysss
Copy link
Author

ejaysss commented Dec 23, 2024

1.1.0

@spacewander
Copy link
Owner

The line 152 of version 1.1.0 doesn't point to EVP_MD_CTX_new:
https://github.com/spacewander/lua-resty-rsa/blob/v1.1.0/lib/resty/rsa.lua#L152

Is the source code modified? Maybe you can install the latest version and try again.

@ejaysss
Copy link
Author

ejaysss commented Dec 27, 2024

Updated to version 1.1.1-1, the situation is similar.

myapp.s1-replica | LuajitError: /root/myapp/.rocks/share/tarantool/resty/rsa.lua:152: tarantool: undefined symbol: EVP_MD_CTX_new
myapp.s1-replica | fatal error, exiting the event loop
myapp.s2-master | LuajitError: /root/myapp/.rocks/share/tarantool/resty/rsa.lua:152: tarantool: undefined symbol: EVP_MD_CTX_new
myapp.s2-master | fatal error, exiting the event loop
myapp.s2-replica | LuajitError: /root/myapp/.rocks/share/tarantool/resty/rsa.lua:152: tarantool: undefined symbol: EVP_MD_CTX_new
myapp.s2-replica | fatal error, exiting the event loop
myapp.router | LuajitError: /root/myapp/.rocks/share/tarantool/resty/rsa.lua:152: tarantool: undefined symbol: EVP_MD_CTX_new
myapp.router | fatal error, exiting the event loop
myapp.s1-master | LuajitError: /root/myapp/.rocks/share/tarantool/resty/rsa.lua:152: tarantool: undefined symbol: EVP_MD_CTX_new
myapp.s1-master | fatal error, exiting the event loop

@spacewander
Copy link
Owner

Since your OpenSSL is 1.0.2k, it should use EVP_MD_CTX_create instead of EVP_MD_CTX_new. I wonder why it goes to the EVP_MD_CTX_new branch.

@spacewander
Copy link
Owner

spacewander commented Dec 30, 2024

Maybe you can add some logs to debug it. Or maybe you can provide a reproducible example (for example, using a CentOS 7 dockerfile) so I can reproduce it by myself?

The code chooses EVP_MD_CTX_create or EVP_MD_CTX_new hasn't been changed since 6 years ago. It has been working well for a long time.

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

2 participants