configure: make clear-memory default but only WARN if backend unsupported

... instead of previous ERROR.
This commit is contained in:
Daniel Stenberg 2015-03-25 09:57:44 +01:00
parent 5f4c249e42
commit b8289b625e

View File

@ -202,12 +202,12 @@ fi
AC_ARG_ENABLE(clear-memory,
AC_HELP_STRING([--disable-clear-memory],[Disable clearing of memory before being freed]),
[CLEAR_MEMORY=$enableval])
if test "$CLEAR_MEMORY" = "yes"; then
if test "$CLEAR_MEMORY" != "no"; then
if test "$support_clear_memory" = "yes"; then
AC_DEFINE(LIBSSH2_CLEAR_MEMORY, 1, [Enable clearing of memory before being freed])
enable_clear_memory=yes
else
AC_MSG_ERROR([secure clearing/zeroing of memory is not supported by the selected crypto backend])
AC_MSG_WARN([secure clearing/zeroing of memory is not supported by the selected crypto backend])
enable_clear_memory=unsupported
fi
else