diff options
author | orbea <orbea@riseup.net> | 2024-10-16 06:23:32 -0700 |
---|---|---|
committer | orbea <orbea@riseup.net> | 2024-10-16 06:24:38 -0700 |
commit | 31854cffd58996eaf107280e4737a31ce80aed70 (patch) | |
tree | 24201d5b2d102b2e4f388de7fe20fb0dae7efd4c /dev-qt/qtnetwork | |
parent | net-misc/curl: new package, add 8.9.1-r1, 8.10.1 (diff) | |
download | libressl-31854cffd58996eaf107280e4737a31ce80aed70.tar.gz libressl-31854cffd58996eaf107280e4737a31ce80aed70.tar.bz2 libressl-31854cffd58996eaf107280e4737a31ce80aed70.zip |
dev-qt/qtnetwork: update OpenBSD patches
Closes: https://github.com/gentoo/libressl/issues/573
Signed-off-by: orbea <orbea@riseup.net>
Diffstat (limited to 'dev-qt/qtnetwork')
-rw-r--r-- | dev-qt/qtnetwork/files/qtnetwork-5.15.7-libressl.patch | 100 |
1 files changed, 52 insertions, 48 deletions
diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.15.7-libressl.patch b/dev-qt/qtnetwork/files/qtnetwork-5.15.7-libressl.patch index c2ab857..a1244e0 100644 --- a/dev-qt/qtnetwork/files/qtnetwork-5.15.7-libressl.patch +++ b/dev-qt/qtnetwork/files/qtnetwork-5.15.7-libressl.patch @@ -101,11 +101,19 @@ index 70cb97aa..01a61cf5 100644 #ifndef QT_NO_SSL class QSslContextPrivate; -diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp -index d9742fd6..fac28b5c 100644 ---- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +disable EVP_PKEY_param_check(), +use the old versions of sk_new(), ..., sk_value() +disable SSL_CONF_CTX + +--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp.orig +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp -@@ -150,16 +150,27 @@ DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return) +@@ -146,16 +146,27 @@ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, + DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return) + DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return) + DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return) ++#ifndef LIBRESSL_VERSION_NUMBER + DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return) ++#endif DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return) DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return) DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return) @@ -126,26 +134,8 @@ index d9742fd6..fac28b5c 100644 +#endif // LIBRESSL_VERSION_NUMBER DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return) DEFINEFUNC2(qssloptions, SSL_CTX_set_options, SSL_CTX *ctx, ctx, qssloptions op, op, return 0, return) -+#ifndef LIBRESSL_VERSION_NUMBER DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return) - DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return) -+#endif // LIBRESSL_VERSION_NUMBER - #ifdef TLS1_3_VERSION - DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return) - DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG) -@@ -185,7 +196,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver - DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return) - DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return) - DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return) -+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3090000fL) - DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG) -+#else -+DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG) -+#endif - DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return) - DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return) - DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return) -@@ -358,12 +373,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return - +@@ -358,12 +369,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a 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) @@ -160,7 +150,28 @@ index d9742fd6..fac28b5c 100644 DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG) DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return) DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return) -@@ -1089,12 +1106,14 @@ bool q_resolveOpenSslSymbols() +@@ -871,15 +884,20 @@ bool q_resolveOpenSslSymbols() + RESOLVEFUNC(AUTHORITY_INFO_ACCESS_free) + RESOLVEFUNC(EVP_PKEY_up_ref) + RESOLVEFUNC(EVP_PKEY_CTX_new) ++#ifdef LIBRESSL_VERSION_NUMBER + RESOLVEFUNC(EVP_PKEY_param_check) ++#endif + RESOLVEFUNC(EVP_PKEY_CTX_free) + RESOLVEFUNC(RSA_bits) ++ ++#ifndef LIBRESSL_VERSION_NUMBER + 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) + RESOLVEFUNC(SSL_CTX_get_security_level) +@@ -1096,12 +1114,14 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey) RESOLVEFUNC(SSL_CTX_use_PrivateKey_file) RESOLVEFUNC(SSL_CTX_get_cert_store); @@ -175,9 +186,13 @@ index d9742fd6..fac28b5c 100644 RESOLVEFUNC(SSL_accept) RESOLVEFUNC(SSL_clear) RESOLVEFUNC(SSL_connect) -diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h -index 27aeffa1..32a21221 100644 ---- a/src/network/ssl/qsslsocket_openssl_symbols_p.h +use compat defines for STACK and INIT_SETTINGS +disable EVP_PKEY_param_check +map q_OPENSSL_sk_*() to q_sk_*() +disable SSL_CONF_CTX +use old signature of CRYPTO_free() + +--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h.orig +++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h @@ -80,6 +80,13 @@ QT_BEGIN_NAMESPACE @@ -187,15 +202,19 @@ index 27aeffa1..32a21221 100644 +typedef _STACK STACK; +typedef STACK OPENSSL_STACK; +typedef void OPENSSL_INIT_SETTINGS; -+typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx); +#endif + ++ #if !defined QT_LINKED_OPENSSL // **************** Shared declarations ****************** // ret func(arg) -@@ -238,12 +245,28 @@ EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); +@@ -236,14 +243,31 @@ int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c); + Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a); + EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); ++#ifndef LIBRESSL_VERSION_NUMBER int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx); ++#endif int q_RSA_bits(RSA *a); +#ifndef LIBRESSL_VERSION_NUMBER Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a); @@ -218,11 +237,10 @@ index 27aeffa1..32a21221 100644 +void *q_sk_value(STACK *a, int b); +#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b) +#endif // LIBRESSL_VERSION_NUMBER -+ int q_SSL_session_reused(SSL *a); - qssloptions q_SSL_CTX_set_options(SSL_CTX *ctx, qssloptions op); - int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); -@@ -497,12 +520,14 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b); + + #if OPENSSL_VERSION_MAJOR < 3 +@@ -515,12 +539,14 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b); int q_SSL_CTX_use_RSAPrivateKey(SSL_CTX *a, RSA *b); int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c); X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a); @@ -233,21 +251,7 @@ index 27aeffa1..32a21221 100644 unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b); int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a); int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c); -+#endif // LIBRESSL_VERSION_NUMBER ++#endif void q_SSL_free(SSL *a); STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a); const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a); -@@ -743,8 +768,13 @@ int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b); - - void *q_CRYPTO_malloc(size_t num, const char *file, int line); - #define q_OPENSSL_malloc(num) q_CRYPTO_malloc(num, "", 0) -+#if !defined(LIBRESSL_VERSION_NUMBER) || (LIBRESSL_VERSION_NUMBER >= 0x3090000fL) - void q_CRYPTO_free(void *str, const char *file, int line); - #define q_OPENSSL_free(addr) q_CRYPTO_free(addr, "", 0) -+#else // LIBRESSL_VERSION_NUMBER -+void q_CRYPTO_free(void *a); -+#define q_OPENSSL_free(addr) q_CRYPTO_free(addr) -+#endif // LIBRESSL_VERSION_NUMBER - - int q_SSL_CTX_get_security_level(const SSL_CTX *ctx); - void q_SSL_CTX_set_security_level(SSL_CTX *ctx, int level); |