From 1d6dd288e1c084a5118785899cca910e8c69fbb1 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 11 Jan 2016 09:02:42 -0500 Subject: Try a little harder to only use SecureZeroMemory when it's present We could be using AC_CHECK_FUNC_DECL too, but it shouldn't be needed. --- src/common/compat_openssl.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/common/compat_openssl.h') diff --git a/src/common/compat_openssl.h b/src/common/compat_openssl.h index 5825ff7a4d..9c98181bdd 100644 --- a/src/common/compat_openssl.h +++ b/src/common/compat_openssl.h @@ -19,8 +19,14 @@ #error "We require OpenSSL >= 1.0.0" #endif -#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,1,0) || \ - defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0) && \ + ! defined(LIBRESSL_VERSION_NUMBER) +/* We define this macro if we're trying to build with the majorly refactored + * API in OpenSSL 1.1 */ +#define OPENSSL_1_1_API +#endif + +#ifndef OPENSSL_1_1_API #define OPENSSL_VERSION SSLEAY_VERSION #define OpenSSL_version(v) SSLeay_version(v) #define OpenSSL_version_num() SSLeay() -- cgit v1.2.3-54-g00ecf