aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-10-11 16:01:24 +0200
committerHans Nilsson <[email protected]>2016-10-11 16:01:24 +0200
commitfec3e5165d2583969770114cc14d0e39a422d61a (patch)
treef6e8dff23a24e3ba32a05af739ef28220aecd6ca /erts
parent301c8e78a1445c0d0080fdb758a3b9e8140fb626 (diff)
parent0411d5492319a5bc555247a3f783aaa421b4f31c (diff)
downloadotp-fec3e5165d2583969770114cc14d0e39a422d61a.tar.gz
otp-fec3e5165d2583969770114cc14d0e39a422d61a.tar.bz2
otp-fec3e5165d2583969770114cc14d0e39a422d61a.zip
Merge branch 'legoscia/ssl_in_fips_mode/PR-1180/OTP-13921'
Conflicts: lib/crypto/c_src/crypto.c lib/ssl/src/ssl_cipher.erl
Diffstat (limited to 'erts')
-rw-r--r--erts/configure.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/erts/configure.in b/erts/configure.in
index dc85b2eafc..b276f8bdfb 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -3921,6 +3921,7 @@ dnl use "PATH/include" and "PATH/lib".
AC_SUBST(SSL_INCLUDE)
AC_SUBST(SSL_INCDIR)
AC_SUBST(SSL_LIBDIR)
+AC_SUBST(SSL_FLAGS)
AC_SUBST(SSL_CRYPTO_LIBNAME)
AC_SUBST(SSL_SSL_LIBNAME)
AC_SUBST(SSL_CC_RUNTIME_LIBRARY_PATH)
@@ -4610,6 +4611,31 @@ no) # Use no ssl runtime library path
esac
+AC_ARG_ENABLE(fips,
+AS_HELP_STRING([--enable-fips], [enable OpenSSL FIPS mode support])
+AS_HELP_STRING([--disable-fips], [disable OpenSSL FIPS mode support (default)]),
+[ case "$enableval" in
+ yes) enable_fips_support=yes ;;
+ *) enable_fips_support=no ;;
+ esac ], enable_fips_support=no)
+
+if test "x$enable_fips_support" = "xyes" && test "$CRYPTO_APP" != ""; then
+ saveCFLAGS="$CFLAGS"
+ saveLDFLAGS="$LDFLAGS"
+ saveLIBS="$LIBS"
+ CFLAGS="$CFLAGS $SSL_INCLUDE"
+ LDFLAGS="$LDFLAGS $SSL_LD_RUNTIME_LIBRARY_PATH -L$SSL_LIBDIR"
+ LIBS="-lcrypto"
+ AC_CHECK_FUNC([FIPS_mode_set],
+ [SSL_FLAGS="-DFIPS_SUPPORT"],
+ [SSL_FLAGS=])
+ CFLAGS="$saveCFLAGS"
+ LDFLAGS="$saveLDFLAGS"
+ LIBS="$saveLIBS"
+else
+ SSL_FLAGS=
+fi
+
#--------------------------------------------------------------------
# Os mon stuff.
#--------------------------------------------------------------------