From e160ba448e2abc840dfa5fbfe5d9c84e13b0440e Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Wed, 25 Mar 2015 22:42:27 +0100 Subject: [PATCH] configure: error if explicitly enabled clear-memory is not supported This takes 22bd8d81d8fab956085e2079bf8c29872455ce59 and b8289b625e291bbb785ed4add31f4759241067f3 into account, but still makes it enabled by default if it is supported and error out in case it is unsupported and was requested. --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7243a524..005fb339 100644 --- a/configure.ac +++ b/configure.ac @@ -207,7 +207,11 @@ if test "$CLEAR_MEMORY" != "no"; then AC_DEFINE(LIBSSH2_CLEAR_MEMORY, 1, [Enable clearing of memory before being freed]) enable_clear_memory=yes else - AC_MSG_WARN([secure clearing/zeroing of memory is not supported by the selected crypto backend]) + if test "$CLEAR_MEMORY" = "yes"; then + AC_MSG_ERROR([secure clearing/zeroing of memory is not supported by the selected crypto backend]) + else + AC_MSG_WARN([secure clearing/zeroing of memory is not supported by the selected crypto backend]) + fi enable_clear_memory=unsupported fi else