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: FIPS_mode #176

Open
CX-ZG opened this issue Jan 25, 2024 · 3 comments
Open

undefined symbol: FIPS_mode #176

CX-ZG opened this issue Jan 25, 2024 · 3 comments

Comments

@CX-ZG
Copy link

CX-ZG commented Jan 25, 2024

My lua-resty-openidc encountered an error while running. I haven't solved it yet:
2024/01/23 10:40:58 [error] 17320#0: *2 lua entry thread aborted: runtime error: /usr/local/openresty/site/lualib/resty/openssl.lua:288: /www/server/nginx/luajit/lib/libluajit-5.1.so.2: undefined symbol: FIPS_mode
stack traceback:
coroutine 0:
[C]: in function '__index'
/usr/local/openresty/site/lualib/resty/openssl.lua:288: in function 'get_fips_mode'
/usr/local/openresty/site/lualib/resty/session/utils.lua:42: in function 'is_fips_mode'
/usr/local/openresty/site/lualib/resty/session/utils.lua:615: in function 'derive_aes_gcm_256_key_and_iv'
/usr/local/openresty/site/lualib/resty/session.lua:940: in function 'save'
/usr/local/openresty/site/lualib/resty/session.lua:1908: in function 'save'
/usr/local/openresty/site/lualib/resty/openidc.lua:385: in function 'openidc_authorize'
/usr/local/openresty/site/lualib/resty/openidc.lua:1543: in function 'authenticate'

@bungle
Copy link
Owner

bungle commented Feb 6, 2024

@CX-ZG most likely difference in OpenSSL version (are you on 1.1.x?). Which version are you running?

@bungle
Copy link
Owner

bungle commented Feb 6, 2024

Perhaps we need to pcall this and default to false in case it fails.

@mioshare
Copy link

In the openssl-1.1.1w version, I encountered the same error. When I used local status, res = pcall(require("resty.openssl").get_fips_mode()), I got the same error. Later, I commented out the line IS_FIPS = require "resty.session.utils".is_fips_mode() in utils.lua and changed it to IS_FIPS = false, which resolved the issue. However, I'm not sure if this modification affects the overall functionality.

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

3 participants