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:09:44 +0000 (16:09 +0100)
./config -DOPENSSL_NO_SECURE_MEMORY

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

(cherry picked from commit 154d8c132fbe22a248f95e95ef21f1840451da62)

crypto/mem_sec.c

index b26ba20a6214a50a13900eaff030c697edfaef7a..b626b3d396f6541bf4fb277dc79930a55a098c0c 100644 (file)
@@ -25,7 +25,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>