mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Rename OpenSSL_version_num() as defined in Tor
This way, if we guess wrong about whether the library has it, we don't conflict with the library's headers. Fixes #40181; bug not in any released version.
This commit is contained in:
parent
dd119b277b
commit
b22568a545
@ -34,7 +34,7 @@
|
||||
|
||||
#ifndef OPENSSL_1_1_API
|
||||
#define OpenSSL_version(v) SSLeay_version(v)
|
||||
#define OpenSSL_version_num() SSLeay()
|
||||
#define tor_OpenSSL_version_num() SSLeay()
|
||||
#define RAND_OpenSSL() RAND_SSLeay()
|
||||
#define STATE_IS_SW_SERVER_HELLO(st) \
|
||||
(((st) == SSL3_ST_SW_SRVR_HELLO_A) || \
|
||||
@ -42,6 +42,7 @@
|
||||
#define OSSL_HANDSHAKE_STATE int
|
||||
#define CONST_IF_OPENSSL_1_1_API
|
||||
#else /* defined(OPENSSL_1_1_API) */
|
||||
#define tor_OpenSSL_version_num() OpenSSL_version_num()
|
||||
#define STATE_IS_SW_SERVER_HELLO(st) \
|
||||
((st) == TLS_ST_SW_SRVR_HELLO)
|
||||
#define CONST_IF_OPENSSL_1_1_API const
|
||||
|
@ -222,7 +222,7 @@ crypto_openssl_early_init(void)
|
||||
|
||||
setup_openssl_threading();
|
||||
|
||||
unsigned long version_num = OpenSSL_version_num();
|
||||
unsigned long version_num = tor_OpenSSL_version_num();
|
||||
const char *version_str = crypto_openssl_get_version_str();
|
||||
if (version_num == OPENSSL_VERSION_NUMBER &&
|
||||
!strcmp(version_str, OPENSSL_VERSION_TEXT)) {
|
||||
|
@ -342,7 +342,7 @@ tor_tls_init(void)
|
||||
|
||||
#if (SIZEOF_VOID_P >= 8 && \
|
||||
OPENSSL_VERSION_NUMBER >= OPENSSL_V_SERIES(1,0,1))
|
||||
long version = OpenSSL_version_num();
|
||||
long version = tor_OpenSSL_version_num();
|
||||
|
||||
/* LCOV_EXCL_START : we can't test these lines on the same machine */
|
||||
if (version >= OPENSSL_V_SERIES(1,0,1)) {
|
||||
|
Loading…
Reference in New Issue
Block a user