jeroen / openssl

OpenSSL bindings for R
Other
63 stars 19 forks source link

Allow the test suite to run on a FIPS system #97

Closed atheriel closed 2 years ago

atheriel commented 2 years ago

This PR actually has two parts:

With these changes the test suite runs on my test FIPS system, which is CentOS-based:

Linking to: OpenSSL 1.0.2k-fips  26 Jan 2017 (FIPS)
<snip>
-- Skipped tests  -------------------------------------------------
* curl cannot be loaded (1)
* fips_mode() is TRUE (23)
* openssl_config()$x25519 is not TRUE (2)

[ FAIL 0 | WARN 0 | SKIP 26 | PASS 353 ]

Related to #96.

jeroen commented 2 years ago

I think we may skip a bit too much now... reading the md5 passworded files errors, but the subsequent reads should not.

Maybe we should run the tests, and verify that under FIPS we get a sensible error message, not a crash or something.

jeroen commented 2 years ago

I have merged the first commit, thanks for catching that.

jeroen commented 2 years ago

OK I manually added most of the other fixes. Thanks!