From 30b7e09e4cf664d232c1feddc96d1e80fb058f48 Mon Sep 17 00:00:00 2001 From: Norbert Pocs Date: Wed, 9 Mar 2022 16:10:42 +0100 Subject: [PATCH] Fix fips mode check in openssl3 FIPS_mode function is no longer supported in openssl version 3 Signed-off-by: Norbert Pocs --- include/libssh/libcrypto.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/libssh/libcrypto.h b/include/libssh/libcrypto.h index 403c2d222..16e5f98f4 100644 --- a/include/libssh/libcrypto.h +++ b/include/libssh/libcrypto.h @@ -110,6 +110,8 @@ typedef BN_CTX* bignum_CTX; /* Returns true if the OpenSSL is operating in FIPS mode */ #ifdef HAVE_OPENSSL_FIPS_MODE #define ssh_fips_mode() (FIPS_mode() != 0) +#elif OPENSSL_VERSION_NUMBER >= 0x30000000L +#define ssh_fips_mode() EVP_default_properties_is_fips_enabled(NULL) #else #define ssh_fips_mode() false #endif -- GitLab