-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Unable to load crypto library with otp version 26.2.5 when built erlang with fips-enabled #8562
Comments
Following patch fixes the issue. (Patch is generated from 26.2.5 version of erlang).
This patch makes erlang load "fips.so" library only when openssl fips is enabled in the system. Can someone from erlang upstream please take this patch? I can't send a PR due to some restrictions at my end. Sorry about that. |
Likely related to erlang/otp#8562
Likely related to erlang/otp#8562
I think I see the same issue when building with
The build string is:
If I drop Was wondering what is the intent behind |
Pull request #8762 is a proposed fix to this problem. I don't think the patch by @sshedi above is correct in the case when fips is provided. #8762 is based on maint branch (OTP 27). |
@HarinadhD hey, I'm facing the same issue on ubuntu 22.04, erlang 26.1.2, you said that it was resolved after installing the openssl-fips-provider package, did you follow these instructions? @sverker do you have an idea when approximately your fix will be released as a patch version for OTP 26? |
I am trying to upgrade erlang version from 25.1.2 to 26.2.5 , erlang 26.X require to build rabbirmq-server 3.13.X
But got an error "Unable to load crypto library" when executing crypto:version(). in erl shell with OTP version 26.2.5
This problem is noticed with 26.2.5 , same issue was not observed with erlang 25.1.2
openssl installed version in both the cases 3.0.13
OTP 26.2.5:
root@vm [ws ]# erl
Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]
Eshell V14.2.5 (press Ctrl+G to abort, type help(). for help)
1> crypto:version().
=ERROR REPORT==== 11-Jun-2024::12:45:57.772369 ===
Unable to load crypto library. Failed with error:
"load, Library load-call unsuccessful (227)."
=WARNING REPORT==== 11-Jun-2024::12:45:57.777686 ===
The on_load function for module crypto returned:
{error,{load,"Library load-call unsuccessful (227)."}}
** exception error: undefined function crypto:version/0
2
### NOTE:
The above issue got resolved after installing openssl-fips-provider package , but OTP 25.1.2 was working without openssl-fips-provider package.
OTP 25.1.2:
root@photon4 [ ~ ]# erl
Erlang/OTP 25 [erts-13.1.2] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]
Eshell V13.1.2 (abort with ^G)
1> crypto:version().
"5.1.2"
2>
To Reproduce
install openssl-devel package
build OTP with fips enabled
execute crypto:version().
root@vm[/ws/ ]# erl
Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]
Eshell V14.2.5 (press Ctrl+G to abort, type help(). for help)
1> crypto:version().
=ERROR REPORT==== 11-Jun-2024::12:45:57.772369 ===
Unable to load crypto library. Failed with error:
"load, Library load-call unsuccessful (227)."
=WARNING REPORT==== 11-Jun-2024::12:45:57.777686 ===
The on_load function for module crypto returned:
{error,{load,"Library load-call unsuccessful (227)."}}
** exception error: undefined function crypto:version/0
Expected behavior
erlang should load crypto library without installing openssl-fips-provider package.
Affected versions
verified Only with OTP 26.2.5
The text was updated successfully, but these errors were encountered: