Add a configure option to opt-out secure memory
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 19 Jan 2018 13:00:14 +0000 (14:00 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 21 Jan 2018 15:08:30 +0000 (16:08 +0100)
./config -DOPENSSL_NO_SECURE_MEMORY

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5113)

crypto/mem_sec.c

index afd0c26..8f4ae9c 100644 (file)
@@ -21,7 +21,7 @@
 #include <string.h>
 
 /* e_os.h includes unistd.h, which defines _POSIX_VERSION */
-#if defined(OPENSSL_SYS_UNIX) \
+#if !defined(OPENSSL_NO_SECURE_MEMORY) && defined(OPENSSL_SYS_UNIX) \
     && defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
 # define IMPLEMENTED
 # include <stdlib.h>