summaryrefslogtreecommitdiffstats
path: root/e_os.h
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-10-05 01:05:54 +0200
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2018-10-05 12:19:48 +0200
commit8529b156421805415bc7b17758255394de580c61 (patch)
tree08dc94426f366c7b6faca92d4fc61bee7936ca83 /e_os.h
parentutil/mkdef.pl: for VMS, allow generation of case insensitive symbol vector (diff)
downloadopenssl-8529b156421805415bc7b17758255394de580c61.tar.xz
openssl-8529b156421805415bc7b17758255394de580c61.zip
test/secmemtest: test secure memory only if it is implemented
Fixes #7322 Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/7351)
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/e_os.h b/e_os.h
index 8991e6202f..534059382b 100644
--- a/e_os.h
+++ b/e_os.h
@@ -317,8 +317,15 @@ struct servent *getservbyname(const char *name, const char *proto);
# endif
/* end vxworks */
-#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
-# define CRYPTO_memcmp memcmp
-#endif
+# ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+# define CRYPTO_memcmp memcmp
+# endif
+/* unistd.h defines _POSIX_VERSION */
+# if !defined(OPENSSL_NO_SECURE_MEMORY) && defined(OPENSSL_SYS_UNIX) \
+ && ( (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) \
+ || defined(__sun) || defined(__hpux) || defined(__sgi) \
+ || defined(__osf__) )
+# define OPENSSL_SECURE_MEMORY /* secure memory is implemented */
+# endif
#endif