fffonion/lua-resty-openssl

Symbol not found: sk_pop_free

Closed this issue · 4 comments

I'm trying to load an X509 certificate, and I get this stack trace:

/nix/store/qk3yaqbsy8plc0y2ip9hspcz7fmlw9jf-luajit-2.1.0-2022-04-05/bin/lua: rocks/share/lua/5.1/resty/openssl/include/stack.lua:41: dlsym(RTLD_DEFAULT, OPENSSL_sk_pop_free): symbol not found
stack traceback:
	[C]: in function '__index'
	rocks/share/lua/5.1/resty/openssl/include/stack.lua:41: in main chunk
	[C]: in function 'require'
	...05-env/share/lua/5.1/resty/openssl/include/x509/init.lua:6: in main chunk
	[C]: in function 'require'
	rocks/share/lua/5.1/resty/openssl/pkey.lua:13: in main chunk
	[C]: in function 'require'
	./util/crypto.lua:12: in main chunk
	[C]: in function 'require'
	main.lua:7: in main chunk
	[C]: at 0x0104078470

Do you know what is causing it?

I think the issue might be related to the fact that I'm on macOS, and there seems to be a version of libressl 2 installed for some reason?

@JJTech0130 Right libressl is a fork we don't support yet. You might want to install openresty from homebrew, which comes with a standardopenssl.

Well, that's fine, I figured out how to get it to use OpenSSL.

Anyway, I'm not actually using OpenResty, I'm trying to modify this library so that I can use it in a KOReader plugin, as I don't want to use the other libraries that make you build for each architecture (as I would have to make a build for each device KOReader supports).

using this library in pure luajit environment (without ngx.* functions) is on my roadmap : ) Currently you will need to remove or replace those functions manually.