From 83cd1255f69dd5fff535fcc2c2147ca021c75d95 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 21 Nov 2022 12:09:07 -0600 Subject: [PATCH] cf: Check for OpenSSL FIPS --- cf/crypto.m4 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cf/crypto.m4 b/cf/crypto.m4 index 059b0aa9e..a8ef51984 100644 --- a/cf/crypto.m4 +++ b/cf/crypto.m4 @@ -140,6 +140,15 @@ if test "$openssl" = "yes"; then [AC_DEFINE_UNQUOTED([HAVE_OPENSSL_30], 1, [whether OpenSSL is 3.0 or higher])] ) + AC_CHECK_HEADERS([openssl/fips.h], + [AC_DEFINE_UNQUOTED([HAVE_OPENSSL_FIPS_H], 1, + [whether openssl/fips.h is available])] + ) + AC_CHECK_LIB([crypto], + [FIPS_mode_set], + [AC_DEFINE_UNQUOTED([HAVE_OPENSSL_FIPS_MODE_SET_API], 1, + [whether FIPS_mode_set API is available])] + ) fi LIB_hcrypto='$(top_builddir)/lib/hcrypto/libhcrypto.la'