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 afd0c26beacb4fad89c6c80d82afdff5ed6fa3cd..8f4ae9c94a73ecaec39ea2b22e7a026ee530563e 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>