summaryrefslogtreecommitdiff
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
parent36d3acb91d5d2f0308ab93be9ce5609f784f95a2 (diff)
downloadopenssl-new-8529b156421805415bc7b17758255394de580c61.tar.gz
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