diff options
author | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-10-05 01:05:54 +0200 |
---|---|---|
committer | Dr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> | 2018-10-05 12:23:34 +0200 |
commit | 5e130ae6328a4553eaafd7df22a3dcbca1b818b3 (patch) | |
tree | 7347e17b6e552120722921a70a7316c20572d23d /e_os.h | |
parent | c11c28052f333ca2fdd921c7f356eebf98b8421a (diff) |
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)
(cherry picked from commit 8529b156421805415bc7b17758255394de580c61)
Diffstat (limited to 'e_os.h')
-rw-r--r-- | e_os.h | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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 |