How to Link Against OpenSSL 3.X's FIPS Module?
Thanks for the lib!
So, I was trying to link libssh against OpenSSL 3.0 and I found I was getting the following link error:
../lib/libssh.so.4.9.4: undefined reference to `FIPS_mode'
collect2: error: ld returned 1 exit status
After investigating this, I found that OpenSSL 3.0 has a breaking change where they've separated their FIPS functions out to a separate lib that typically lives at INSTALL_PREFIX/lib/ossl-modules/fips.so
. See https://www.openssl.org/docs/man3.0/man7/fips_module.html. It appears that libssh only links against libssl and libcrypto. No attempt in the CMake scripts is made to detect/link against fips.so
AFAICT.
So my question is, is there any plan to do so or should I just stick with linking against OpenSSL 1.X? If it is possible, then how do I tell libssh to link with my INSTALL_PREFIX/lib/ossl-modules/fips.so
?
To provide better context, I'm cross-compiling for an ARM target using arm-linux-gnueabihf-gcc. Script attached.