aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/c_src/openssl_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/c_src/openssl_config.h')
-rw-r--r--lib/crypto/c_src/openssl_config.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/crypto/c_src/openssl_config.h b/lib/crypto/c_src/openssl_config.h
index 9550785190..802fb3e83c 100644
--- a/lib/crypto/c_src/openssl_config.h
+++ b/lib/crypto/c_src/openssl_config.h
@@ -307,4 +307,11 @@ do { \
#define PRINTF_ERR1(FMT,A1)
#define PRINTF_ERR2(FMT,A1,A2)
+#ifdef FIPS_SUPPORT
+/* In FIPS mode non-FIPS algorithms are disabled and return badarg. */
+#define CHECK_NO_FIPS_MODE() { if (FIPS_mode()) return atom_notsup; }
+#else
+#define CHECK_NO_FIPS_MODE()
+#endif
+
#endif /* E_OPENSSL_CONFIG_H__ */