diff --git a/config.h.in b/config.h.in index aa9bc0a2f0..151b23912f 100644 --- a/config.h.in +++ b/config.h.in @@ -120,9 +120,6 @@ int sigwait(const unsigned int *set, int *sig); /** define if you have strerror in the C library. */ #undef HAVE_STRERROR -/* Define if OpenSSL provides FIPS_mode() */ -#undef HAVE_FIPS_MODE - /* Define if OpenSSL includes DSA support */ #undef HAVE_OPENSSL_DSA @@ -247,6 +244,9 @@ int sigwait(const unsigned int *set, int *sig); /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H +/* Define if OpenSSL provides FIPS_mode() */ +#undef HAVE_FIPS_MODE + /* Define to 1 if you have the `fseeko' function. */ #undef HAVE_FSEEKO diff --git a/configure b/configure index 698d2492f2..db4d2fc16c 100755 --- a/configure +++ b/configure @@ -16230,6 +16230,39 @@ $as_echo "Skipped OpenSSL version check" >&6; } ;; esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL FIPS mode support" >&5 +$as_echo_n "checking for OpenSSL FIPS mode support... " >&6; } + have_fips_mode="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FIPS_mode(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + have_fips_mode=yes +else + have_fips_mode=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "x$have_fips_mode" = "xyes" + then + +$as_echo "#define HAVE_FIPS_MODE 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL DSA support" >&5 $as_echo_n "checking for OpenSSL DSA support... " >&6; } if test -f $use_openssl/include/openssl/dsa.h