svn commit: r531857 - head/net/qt5-network/files
Tobias C. Berner
tcberner at FreeBSD.org
Thu Apr 16 16:11:03 UTC 2020
Author: tcberner
Date: Thu Apr 16 16:11:01 2020
New Revision: 531857
URL: https://svnweb.freebsd.org/changeset/ports/531857
Log:
net/qt5-network: readd support for LibreSSL
- as with every Qt5 upgrade, we dropped LibreSSL support
- this readds it
PR: 245600
Submitted by: rozhuk.im at gmail.com
Reported by: p5B2E9A8F at t-online.de
Added:
head/net/qt5-network/files/patch-qsslsocket_openssl11_symbols_p.h
- copied, changed from r531600, head/net/qt5-network/files/patch-qsslsocket_openssl11_symbols_p.h
head/net/qt5-network/files/patch-src_network_ssl_qsslcontext_openssl.cpp
- copied unchanged from r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslcontext_openssl.cpp
head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl.cpp
- copied unchanged from r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl.cpp
head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols.cpp
- copied unchanged from r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols.cpp
head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols_p.h
- copied, changed from r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols_p.h
Copied and modified: head/net/qt5-network/files/patch-qsslsocket_openssl11_symbols_p.h (from r531600, head/net/qt5-network/files/patch-qsslsocket_openssl11_symbols_p.h)
==============================================================================
--- head/net/qt5-network/files/patch-qsslsocket_openssl11_symbols_p.h Mon Apr 13 12:27:26 2020 (r531600, copy source)
+++ head/net/qt5-network/files/patch-qsslsocket_openssl11_symbols_p.h Thu Apr 16 16:11:01 2020 (r531857)
@@ -1,6 +1,6 @@
--- src/network/ssl/qsslsocket_openssl11_symbols_p.h.orig 2019-10-01 07:47:24 UTC
+++ src/network/ssl/qsslsocket_openssl11_symbols_p.h
-@@ -77,19 +77,48 @@
+@@ -77,20 +77,49 @@
const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
@@ -17,13 +17,13 @@
Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
--int q_DSA_bits(DSA *a);
+#ifdef LIBRESSL_VERSION_NUMBER
+#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
+#else
-+ int q_DSA_bits(DSA *a);
+ int q_DSA_bits(DSA *a);
+#endif
int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
+ Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
int q_EVP_PKEY_base_id(EVP_PKEY *a);
int q_RSA_bits(RSA *a);
+#ifdef LIBRESSL_VERSION_NUMBER
@@ -50,7 +50,7 @@
int q_SSL_session_reused(SSL *a);
unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
-@@ -110,12 +139,15 @@ STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE
+@@ -113,12 +142,15 @@
void q_DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
int q_DH_bits(DH *dh);
Copied: head/net/qt5-network/files/patch-src_network_ssl_qsslcontext_openssl.cpp (from r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslcontext_openssl.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/qt5-network/files/patch-src_network_ssl_qsslcontext_openssl.cpp Thu Apr 16 16:11:01 2020 (r531857, copy of r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslcontext_openssl.cpp)
@@ -0,0 +1,11 @@
+--- src/network/ssl/qsslcontext_openssl.cpp.orig 2019-10-01 08:05:51 UTC
++++ src/network/ssl/qsslcontext_openssl.cpp
+@@ -265,7 +265,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslC
+ }
+ #endif // ocsp
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
+ if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
+ QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
+ if (cctx) {
Copied: head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl.cpp (from r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl.cpp Thu Apr 16 16:11:01 2020 (r531857, copy of r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl.cpp)
@@ -0,0 +1,11 @@
+--- src/network/ssl/qsslsocket_openssl.cpp.orig 2019-10-01 08:09:52 UTC
++++ src/network/ssl/qsslsocket_openssl.cpp
+@@ -604,7 +604,7 @@ bool QSslSocketBackendPrivate::initSslContext()
+ q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
+ }
+ #endif
+-#if OPENSSL_VERSION_NUMBER >= 0x10101006L
++#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
+ // Set the client callback for TLSv1.3 PSK
+ if (mode == QSslSocket::SslClientMode
+ && QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
Copied: head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols.cpp (from r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols.cpp)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols.cpp Thu Apr 16 16:11:01 2020 (r531857, copy of r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols.cpp)
@@ -0,0 +1,86 @@
+--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2019-10-25 09:16:48.000000000 +0200
++++ src/network/ssl/qsslsocket_openssl_symbols.cpp 2019-11-01 20:03:08.715014000 +0100
+@@ -152,6 +152,14 @@
+ DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
+ DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return)
+ DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
++#ifdef LIBRESSL_VERSION_NUMBER
++DEFINEFUNC(int, sk_num, OPENSSL_STACK *a, a, return -1, return)
++DEFINEFUNC2(void, sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
++DEFINEFUNC(OPENSSL_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
++DEFINEFUNC2(void, sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
++DEFINEFUNC(void, sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
++DEFINEFUNC2(void *, sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
++#else
+ DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
+ DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
+ DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+@@ -159,6 +167,7 @@
+ DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
+ DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
+ DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
++#endif
+ DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
+ DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
+ #ifdef TLS1_3_VERSION
+@@ -443,7 +452,7 @@
+ DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return)
+ DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
+ DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return nullptr, return)
+-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
+ DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, return);
+ DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return);
+ DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return);
+@@ -839,8 +848,8 @@
+ #endif
+ #if defined(SHLIB_VERSION_NUMBER) && !defined(Q_OS_QNX) // on QNX, the libs are always libssl.so and libcrypto.so
+ // first attempt: the canonical name is libssl.so.<SHLIB_VERSION_NUMBER>
+- libssl->setFileNameAndVersion(QLatin1String("ssl"), QLatin1String(SHLIB_VERSION_NUMBER));
+- libcrypto->setFileNameAndVersion(QLatin1String("crypto"), QLatin1String(SHLIB_VERSION_NUMBER));
++ libssl->setFileNameAndVersion(QLatin1String("%%OPENSSLLIB%%/libssl"), QLatin1String(SHLIB_VERSION_NUMBER));
++ libcrypto->setFileNameAndVersion(QLatin1String("%%OPENSSLLIB%%/libcrypto"), QLatin1String(SHLIB_VERSION_NUMBER));
+ if (libcrypto->load() && libssl->load()) {
+ // libssl.so.<SHLIB_VERSION_NUMBER> and libcrypto.so.<SHLIB_VERSION_NUMBER> found
+ return pair;
+@@ -980,12 +989,21 @@
+ RESOLVEFUNC(EVP_CIPHER_CTX_reset)
+ RESOLVEFUNC(EVP_PKEY_base_id)
+ RESOLVEFUNC(RSA_bits)
++#ifdef LIBRESSL_VERSION_NUMBER
++ RESOLVEFUNC(sk_new_null)
++ RESOLVEFUNC(sk_push)
++ RESOLVEFUNC(sk_free)
++ RESOLVEFUNC(sk_num)
++ RESOLVEFUNC(sk_pop_free)
++ RESOLVEFUNC(sk_value)
++#else
+ RESOLVEFUNC(OPENSSL_sk_new_null)
+ RESOLVEFUNC(OPENSSL_sk_push)
+ RESOLVEFUNC(OPENSSL_sk_free)
+ RESOLVEFUNC(OPENSSL_sk_num)
+ RESOLVEFUNC(OPENSSL_sk_pop_free)
+ RESOLVEFUNC(OPENSSL_sk_value)
++#endif
+ RESOLVEFUNC(DH_get0_pqg)
+ RESOLVEFUNC(SSL_CTX_set_options)
+ #ifdef TLS1_3_VERSION
+@@ -1024,7 +1042,9 @@
+
+ RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
+ RESOLVEFUNC(DH_bits)
++#ifndef LIBRESSL_VERSION_NUMBER
+ RESOLVEFUNC(DSA_bits)
++#endif
+
+ #if QT_CONFIG(dtls)
+ RESOLVEFUNC(DTLSv1_listen)
+@@ -1280,7 +1300,7 @@
+ RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
+ RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
+ RESOLVEFUNC(SSL_CTX_get_cert_store);
+-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
+ RESOLVEFUNC(SSL_CONF_CTX_new);
+ RESOLVEFUNC(SSL_CONF_CTX_free);
+ RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
Copied and modified: head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols_p.h (from r531600, head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols_p.h)
==============================================================================
--- head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols_p.h Mon Apr 13 12:27:26 2020 (r531600, copy source)
+++ head/net/qt5-network/files/patch-src_network_ssl_qsslsocket_openssl_symbols_p.h Thu Apr 16 16:11:01 2020 (r531857)
@@ -1,6 +1,6 @@
--- src/network/ssl/qsslsocket_openssl_symbols_p.h.orig 2019-10-01 07:47:06 UTC
+++ src/network/ssl/qsslsocket_openssl_symbols_p.h
-@@ -72,6 +72,12 @@
+@@ -72,6 +72,14 @@
#include "qsslsocket_openssl_p.h"
#include <QtCore/qglobal.h>
@@ -8,6 +8,8 @@
+# define TLS1_2_VERSION 0x0303
+# define TLS_MAX_VERSION TLS1_2_VERSION
+# define TLS_ANY_VERSION 0x10000
++# define DTLS1_2_VERSION 0xFEFD
++# define DTLS_MAX_VERSION DTLS1_2_VERSION
+#endif
+
#if QT_CONFIG(ocsp)
More information about the svn-ports-all
mailing list