QSsl: use QT_CONFIG(feature) instead of hardcoded constant
The test OPENSSL_VERSION_NUMBER >= 0x1010000000L was introduced before 1.1 support. Now a couple of conditional inclusions can be converted into QT_CONFIG(opensslv11). Task-number: QTBUG-64275 Change-Id: I627e6b06f334deac70c827e463ecbfad879dfc24 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
14218b880a
commit
16b76456be
@ -1017,7 +1017,7 @@ bool q_resolveOpenSslSymbols()
|
|||||||
RESOLVEFUNC(EC_GROUP_get_degree)
|
RESOLVEFUNC(EC_GROUP_get_degree)
|
||||||
#endif
|
#endif
|
||||||
RESOLVEFUNC(BN_num_bits)
|
RESOLVEFUNC(BN_num_bits)
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
#if QT_CONFIG(opensslv11)
|
||||||
RESOLVEFUNC(BN_is_word)
|
RESOLVEFUNC(BN_is_word)
|
||||||
#endif
|
#endif
|
||||||
RESOLVEFUNC(BN_mod_word)
|
RESOLVEFUNC(BN_mod_word)
|
||||||
|
@ -232,9 +232,10 @@ BIO *q_BIO_new_mem_buf(void *a, int b);
|
|||||||
int q_BIO_read(BIO *a, void *b, int c);
|
int q_BIO_read(BIO *a, void *b, int c);
|
||||||
Q_AUTOTEST_EXPORT int q_BIO_write(BIO *a, const void *b, int c);
|
Q_AUTOTEST_EXPORT int q_BIO_write(BIO *a, const void *b, int c);
|
||||||
int q_BN_num_bits(const BIGNUM *a);
|
int q_BN_num_bits(const BIGNUM *a);
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
|
||||||
|
#if QT_CONFIG(opensslv11)
|
||||||
int q_BN_is_word(BIGNUM *a, BN_ULONG w);
|
int q_BN_is_word(BIGNUM *a, BN_ULONG w);
|
||||||
#else
|
#else // opensslv11
|
||||||
// BN_is_word is implemented purely as a
|
// BN_is_word is implemented purely as a
|
||||||
// macro in OpenSSL < 1.1. It doesn't
|
// macro in OpenSSL < 1.1. It doesn't
|
||||||
// call any functions.
|
// call any functions.
|
||||||
@ -245,7 +246,8 @@ int q_BN_is_word(BIGNUM *a, BN_ULONG w);
|
|||||||
//
|
//
|
||||||
// Users are required to include <openssl/bn.h>.
|
// Users are required to include <openssl/bn.h>.
|
||||||
#define q_BN_is_word BN_is_word
|
#define q_BN_is_word BN_is_word
|
||||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10100000L
|
#endif // !opensslv11
|
||||||
|
|
||||||
BN_ULONG q_BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
BN_ULONG q_BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
||||||
#ifndef OPENSSL_NO_EC
|
#ifndef OPENSSL_NO_EC
|
||||||
const EC_GROUP* q_EC_KEY_get0_group(const EC_KEY* k);
|
const EC_GROUP* q_EC_KEY_get0_group(const EC_KEY* k);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user