summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat_openssl.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/compat_openssl.h b/src/common/compat_openssl.h
index 1bfe188075..76679872bc 100644
--- a/src/common/compat_openssl.h
+++ b/src/common/compat_openssl.h
@@ -8,6 +8,8 @@
#define TOR_COMPAT_OPENSSL_H
#include <openssl/opensslv.h>
+// workaround for libressl; not needed in later Tor versions.
+#include <openssl/crypto.h>
/**
* \file compat_openssl.h
@@ -27,8 +29,11 @@
#define OPENSSL_1_1_API
#endif
-#ifndef OPENSSL_1_1_API
+#ifndef OPENSSL_VERSION
#define OPENSSL_VERSION SSLEAY_VERSION
+#endif
+
+#ifndef OPENSSL_1_1_API
#define OpenSSL_version(v) SSLeay_version(v)
#define OpenSSL_version_num() SSLeay()
#define RAND_OpenSSL() RAND_SSLeay()