From 62afbbe1ca68a0be3ded404ada20fd4cecf7c5f3 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Mon, 18 Jan 2021 19:23:33 -0500 Subject: [PATCH] Initialize OpenSSL before FIPS_mode_set Otherwise you don't actually get any errors! --- openssl/src/fips.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/openssl/src/fips.rs b/openssl/src/fips.rs index e6a2a4be4..a3be3219d 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(|_| ()) } } -- GitLab