From ac56aab30b5b75c83e2797ef1a1b1ddd1520dfe6 Mon Sep 17 00:00:00 2001 From: Xuhui Miao Date: Wed, 27 Jul 2022 12:20:07 +0000 Subject: [PATCH] Revert "Revert openssl fips mode setting" This reverts commit 5882a3e05a7c55b76dab3beb98b4ee0342f7c17f. --- src/openssl.patch/10-support-fips-mode.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/openssl.patch/10-support-fips-mode.patch b/src/openssl.patch/10-support-fips-mode.patch index 5c44f35..8c91700 100644 --- a/src/openssl.patch/10-support-fips-mode.patch +++ b/src/openssl.patch/10-support-fips-mode.patch @@ -161,6 +161,23 @@ index 1b0d523bea..31fbd42cd2 100644 # ifndef OPENSSL_NO_STATIC_ENGINE # if !defined(OPENSSL_NO_HW) && !defined(OPENSSL_NO_HW_PADLOCK) if ((opts & OPENSSL_INIT_ENGINE_PADLOCK) +diff --git a/crypto/o_fips.c b/crypto/o_fips.c +index 050ea9c216..6e9ffdb1d9 100644 +--- a/crypto/o_fips.c ++++ b/crypto/o_fips.c +@@ -9,8 +9,12 @@ + + #include "internal/cryptlib.h" + ++extern int g_fips_mode_enabled; + int FIPS_mode(void) + { ++ if (g_fips_mode_enabled == 1){ ++ return g_fips_mode_enabled; ++ } + /* This version of the library does not support FIPS mode. */ + return 0; + } diff --git a/crypto/engine/build.info b/crypto/engine/build.info index e00802a3fd..66bb39fa38 100644 --- a/crypto/engine/build.info