aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-05-03 13:33:14 -0400
committerNick Mathewson <nickm@torproject.org>2018-05-03 13:33:14 -0400
commit89cafc4afac37ee3c9186f5c600cdf2fba1d7d1c (patch)
treee8820cb54aca9e61ec9c9343e89d29943ead2570 /src/common/tortls.c
parent5e0316142f14df890e34180dba087cd0264fba70 (diff)
downloadtor-89cafc4afac37ee3c9186f5c600cdf2fba1d7d1c.tar.gz
tor-89cafc4afac37ee3c9186f5c600cdf2fba1d7d1c.zip
Use OPENSSL_1_1_API in place of raw OPENSSL_VERSION_NUMBER checks
This is needed for libressl-2.6.4 compatibility, which we broke when we merged a15b2c57e1f901c53 to fix bug 19981. Fixes bug 26005; bug not in any released Tor.
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index cd236363f8..4044a0e708 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -56,7 +56,7 @@ ENABLE_GCC_WARNING(redundant-decls)
#include "container.h"
#include <string.h>
-#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
+#ifdef OPENSSL_1_1_API
#define X509_get_notBefore_const(cert) \
X509_get0_notBefore(cert)
#define X509_get_notAfter_const(cert) \
@@ -370,7 +370,7 @@ tor_tls_init(void)
check_no_tls_errors();
if (!tls_library_is_initialized) {
-#if OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,1,0)
+#ifdef OPENSSL_1_1_API
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL);
#else
SSL_library_init();