ce232b09fa
[ci skip] Closes: #11191 [via git-merge-pr]
100 lines
5 KiB
Diff
100 lines
5 KiB
Diff
--- qtbase/src/network/ssl/qsslellipticcurve_openssl.cpp 2017-01-18 15:20:58.000000000 +0100
|
|
+++ qtbase/src/network/ssl/qsslellipticcurve_openssl.cpp 2017-02-21 16:25:56.477986158 +0100
|
|
@@ -83,7 +83,7 @@
|
|
const QByteArray curveNameLatin1 = name.toLatin1();
|
|
int nid = q_OBJ_sn2nid(curveNameLatin1.data());
|
|
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
if (nid == 0 && QSslSocket::sslLibraryVersionNumber() >= 0x10002000L)
|
|
nid = q_EC_curve_nist2nid(curveNameLatin1.data());
|
|
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
--- qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-01-18 15:20:58.000000000 +0100
|
|
+++ qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-02-21 19:14:32.805677245 +0100
|
|
@@ -791,7 +791,7 @@
|
|
RESOLVEFUNC(EC_GROUP_get_degree)
|
|
#endif
|
|
RESOLVEFUNC(BN_num_bits)
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
RESOLVEFUNC(BN_is_word)
|
|
#endif
|
|
RESOLVEFUNC(BN_mod_word)
|
|
--- qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-01-18 15:20:58.000000000 +0100
|
|
+++ qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-02-21 19:15:38.083714302 +0100
|
|
@@ -228,7 +228,7 @@
|
|
Q_AUTOTEST_EXPORT BIO_METHOD *q_BIO_s_mem();
|
|
Q_AUTOTEST_EXPORT int q_BIO_write(BIO *a, const void *b, int c);
|
|
int q_BN_num_bits(const BIGNUM *a);
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
int q_BN_is_word(BIGNUM *a, BN_ULONG w);
|
|
#else
|
|
// BN_is_word is implemented purely as a
|
|
@@ -241,7 +241,7 @@
|
|
//
|
|
// Users are required to include <openssl/bn.h>.
|
|
#define q_BN_is_word BN_is_word
|
|
-#endif // OPENSSL_VERSION_NUMBER >= 0x10100000L
|
|
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
BN_ULONG q_BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
|
#ifndef OPENSSL_NO_EC
|
|
const EC_GROUP* q_EC_KEY_get0_group(const EC_KEY* k);
|
|
@@ -509,13 +509,13 @@
|
|
|
|
// EC curves management
|
|
size_t q_EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
int q_EC_curve_nist2nid(const char *name);
|
|
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
#endif // OPENSSL_NO_EC
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
#define q_SSL_get_server_tmp_key(ssl, key) q_SSL_ctrl((ssl), SSL_CTRL_GET_SERVER_TMP_KEY, 0, (char *)key)
|
|
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
|
|
// PKCS#12 support
|
|
int q_PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca);
|
|
--- qtbase/src/network/ssl/qsslcontext_openssl.cpp 2017-01-18 15:20:58.000000000 +0100
|
|
+++ qtbase/src/network/ssl/qsslcontext_openssl.cpp 2017-02-21 19:23:04.291975945 +0100
|
|
@@ -159,7 +159,7 @@
|
|
m_npnContext.data = reinterpret_cast<unsigned char *>(m_supportedNPNVersions.data());
|
|
m_npnContext.len = m_supportedNPNVersions.count();
|
|
m_npnContext.status = QSslConfiguration::NextProtocolNegotiationNone;
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
|
|
// Callback's type has a parameter 'const unsigned char ** out'
|
|
// since it was introduced in 1.0.2. Internally, OpenSSL's own code
|
|
--- qtbase/src/network/ssl/qsslsocket_opensslpre11.cpp 2017-11-30 14:49:46.000000000 +0100
|
|
+++ qtbase/src/network/ssl/qsslsocket_opensslpre11.cpp 2018-01-27 18:06:50.939540932 +0100
|
|
@@ -228,7 +228,7 @@
|
|
q_SSL_load_error_strings();
|
|
q_OpenSSL_add_all_algorithms_safe();
|
|
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10001000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
if (q_SSLeay() >= 0x10001000L)
|
|
QSslSocketBackendPrivate::s_indexForSSLExtraData = q_SSL_get_ex_new_index(0L, NULL, NULL, NULL, NULL);
|
|
#endif
|
|
@@ -382,7 +382,7 @@
|
|
} else {
|
|
const unsigned char *proto = 0;
|
|
unsigned int proto_len = 0;
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
if (q_SSLeay() >= 0x10002000L) {
|
|
q_SSL_get0_alpn_selected(ssl, &proto, &proto_len);
|
|
if (proto_len && mode == QSslSocket::SslClientMode) {
|
|
@@ -405,7 +405,7 @@
|
|
}
|
|
#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
|
|
|
|
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
if (q_SSLeay() >= 0x10002000L && mode == QSslSocket::SslClientMode) {
|
|
EVP_PKEY *key;
|
|
if (q_SSL_get_server_tmp_key(ssl, &key))
|