mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Compatibility defines should be used for LibreSSL.
LibreSSL doesn't use OpenSSL_version (it uses the older SSLeay_version API), but it reports a major version number as 2 in OPENSSL_VERSION_NUMBER. Instead of fudging the version check, for now, let's just check if we're using LibreSSL by checking the version number macro exists, and use compatibility defines unconditionally when we detect LibreSSL.
This commit is contained in:
committed by
Nick Mathewson
parent
62bc4a199a
commit
be841f77aa
@@ -19,7 +19,8 @@
|
||||
#error "We require OpenSSL >= 1.0.0"
|
||||
#endif
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,1,0)
|
||||
#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,1,0) || \
|
||||
defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define OPENSSL_VERSION SSLEAY_VERSION
|
||||
#define OpenSSL_version(v) SSLeay_version(v)
|
||||
#define OpenSSL_version_num() SSLeay()
|
||||
|
||||
Reference in New Issue
Block a user