diff options
author | Steven Fackler <sfackler@gmail.com> | 2021-01-18 19:23:33 -0500 |
---|---|---|
committer | Steven Fackler <sfackler@gmail.com> | 2021-01-18 19:23:33 -0500 |
commit | 62afbbe1ca68a0be3ded404ada20fd4cecf7c5f3 (patch) | |
tree | 29386a5e655592fb89854f795d53bafb4e33ca54 | |
parent | 5831928594cf65aeebbf088b29fb203e3f5633e6 (diff) | |
download | rust-openssl-62afbbe1ca68a0be3ded404ada20fd4cecf7c5f3.zip |
Initialize OpenSSL before FIPS_mode_set
Otherwise you don't actually get any errors!
-rw-r--r-- | openssl/src/fips.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openssl/src/fips.rs b/openssl/src/fips.rs index e6a2a4be..a3be3219 100644 --- a/openssl/src/fips.rs +++ b/openssl/src/fips.rs @@ -10,6 +10,7 @@ use crate::error::ErrorStack; /// /// This corresponds to `FIPS_mode_set`. pub fn enable(enabled: bool) -> Result<(), ErrorStack> { + ffi::init(); unsafe { cvt(ffi::FIPS_mode_set(enabled as _)).map(|_| ()) } } |