Lines 1-33
Link Here
|
1 |
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2020-05-05 11:59:27 UTC |
1 |
Patch from Gentoo: https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-qt/qtnetwork/files/qtnetwork-5.15.1-libressl.patch |
|
|
2 |
--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2020-09-02 10:15:07 UTC |
2 |
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp |
3 |
+++ src/network/ssl/qsslsocket_openssl_symbols.cpp |
3 |
@@ -147,6 +147,14 @@ DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX * |
4 |
@@ -145,11 +145,14 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYA |
|
|
5 |
DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return) |
6 |
DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return) |
4 |
DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return) |
7 |
DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return) |
|
|
8 |
+#ifdef OPENSSL_NO_DEPRECATED_3_0 |
9 |
DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return) |
10 |
DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return) |
11 |
DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return) |
12 |
+#endif // OPENSSL_NO_DEPRECATED_3_0 |
5 |
DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return) |
13 |
DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return) |
6 |
DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return) |
14 |
DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return) |
7 |
+#ifdef LIBRESSL_VERSION_NUMBER |
15 |
+#ifndef LIBRESSL_VERSION_NUMBER |
8 |
+DEFINEFUNC(int, sk_num, OPENSSL_STACK *a, a, return -1, return) |
|
|
9 |
+DEFINEFUNC2(void, sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG) |
10 |
+DEFINEFUNC(OPENSSL_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return) |
11 |
+DEFINEFUNC2(void, sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG) |
12 |
+DEFINEFUNC(void, sk_free, OPENSSL_STACK *a, a, return, DUMMYARG) |
13 |
+DEFINEFUNC2(void *, sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return) |
14 |
+#else |
15 |
DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return) |
16 |
DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return) |
16 |
DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return) |
17 |
DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return) |
17 |
DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG) |
18 |
DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG) |
18 |
@@ -154,6 +162,7 @@ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMY |
19 |
@@ -157,6 +160,14 @@ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMY |
19 |
DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG) |
20 |
DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG) |
20 |
DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG) |
21 |
DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG) |
21 |
DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return) |
22 |
DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return) |
22 |
+#endif |
23 |
+#else |
|
|
24 |
+DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return) |
25 |
+DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG) |
26 |
+DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return) |
27 |
+DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG) |
28 |
+DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG) |
29 |
+DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return) |
30 |
+#endif // LIBRESSL_VERSION_NUMBER |
23 |
DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return) |
31 |
DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return) |
24 |
DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return) |
32 |
DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return) |
25 |
#ifdef TLS1_3_VERSION |
33 |
#ifdef TLS1_3_VERSION |
26 |
@@ -351,12 +360,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a |
34 |
@@ -182,7 +193,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE |
|
|
35 |
DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return) |
36 |
DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return) |
37 |
DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return) |
38 |
+#ifndef LIBRESSL_VERSION_NUMBER |
39 |
DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG) |
40 |
+#else |
41 |
+DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG) |
42 |
+#endif |
43 |
DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return) |
44 |
DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return) |
45 |
DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return) |
46 |
@@ -222,7 +237,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING |
47 |
ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid, |
48 |
return 0, return) |
49 |
DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return) |
50 |
+#ifndef LIBRESSL_VERSION_NUMBER |
51 |
DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return) |
52 |
+#endif |
53 |
DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return) |
54 |
DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s, |
55 |
int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return) |
56 |
@@ -354,12 +371,14 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a |
27 |
DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return) |
57 |
DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return) |
28 |
DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return) |
58 |
DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return) |
29 |
DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return nullptr, return) |
59 |
DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return nullptr, return) |
30 |
+#if !defined(LIBRESSL_VERSION_NUMBER) |
60 |
+#ifndef LIBRESSL_VERSION_NUMBER |
31 |
DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, return); |
61 |
DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, return); |
32 |
DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return); |
62 |
DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return); |
33 |
DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return); |
63 |
DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return); |
Lines 38-55
Link Here
|
38 |
DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG) |
68 |
DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG) |
39 |
DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return) |
69 |
DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return) |
40 |
DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return) |
70 |
DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return) |
41 |
@@ -834,12 +845,21 @@ bool q_resolveOpenSslSymbols() |
71 |
@@ -843,17 +862,21 @@ bool q_resolveOpenSslSymbols() |
|
|
72 |
RESOLVEFUNC(ASN1_STRING_get0_data) |
73 |
RESOLVEFUNC(EVP_CIPHER_CTX_reset) |
42 |
RESOLVEFUNC(EVP_PKEY_up_ref) |
74 |
RESOLVEFUNC(EVP_PKEY_up_ref) |
|
|
75 |
+#ifdef OPENSSL_NO_DEPRECATED_3_0 |
76 |
RESOLVEFUNC(EVP_PKEY_CTX_new) |
77 |
RESOLVEFUNC(EVP_PKEY_param_check) |
78 |
RESOLVEFUNC(EVP_PKEY_CTX_free) |
79 |
+#endif // OPENSSL_NO_DEPRECATED_3_0 |
43 |
RESOLVEFUNC(EVP_PKEY_base_id) |
80 |
RESOLVEFUNC(EVP_PKEY_base_id) |
44 |
RESOLVEFUNC(RSA_bits) |
81 |
RESOLVEFUNC(RSA_bits) |
45 |
+#ifdef LIBRESSL_VERSION_NUMBER |
82 |
+#ifndef LIBRESSL_VERSION_NUMBER |
46 |
+ RESOLVEFUNC(sk_new_null) |
|
|
47 |
+ RESOLVEFUNC(sk_push) |
48 |
+ RESOLVEFUNC(sk_free) |
49 |
+ RESOLVEFUNC(sk_num) |
50 |
+ RESOLVEFUNC(sk_pop_free) |
51 |
+ RESOLVEFUNC(sk_value) |
52 |
+#else |
53 |
RESOLVEFUNC(OPENSSL_sk_new_null) |
83 |
RESOLVEFUNC(OPENSSL_sk_new_null) |
54 |
RESOLVEFUNC(OPENSSL_sk_push) |
84 |
RESOLVEFUNC(OPENSSL_sk_push) |
55 |
RESOLVEFUNC(OPENSSL_sk_free) |
85 |
RESOLVEFUNC(OPENSSL_sk_free) |
Lines 60-66
Link Here
|
60 |
RESOLVEFUNC(DH_get0_pqg) |
90 |
RESOLVEFUNC(DH_get0_pqg) |
61 |
RESOLVEFUNC(SSL_CTX_set_options) |
91 |
RESOLVEFUNC(SSL_CTX_set_options) |
62 |
|
92 |
|
63 |
@@ -881,7 +901,9 @@ bool q_resolveOpenSslSymbols() |
93 |
@@ -895,7 +918,9 @@ bool q_resolveOpenSslSymbols() |
64 |
|
94 |
|
65 |
RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint) |
95 |
RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint) |
66 |
RESOLVEFUNC(DH_bits) |
96 |
RESOLVEFUNC(DH_bits) |
Lines 70-80
Link Here
|
70 |
|
100 |
|
71 |
#if QT_CONFIG(dtls) |
101 |
#if QT_CONFIG(dtls) |
72 |
RESOLVEFUNC(DTLSv1_listen) |
102 |
RESOLVEFUNC(DTLSv1_listen) |
73 |
@@ -1041,12 +1063,14 @@ bool q_resolveOpenSslSymbols() |
103 |
@@ -925,7 +950,9 @@ bool q_resolveOpenSslSymbols() |
|
|
104 |
RESOLVEFUNC(OCSP_check_validity) |
105 |
RESOLVEFUNC(OCSP_cert_to_id) |
106 |
RESOLVEFUNC(OCSP_id_get0_info) |
107 |
+#ifndef LIBRESSL_VERSION_NUMBER |
108 |
RESOLVEFUNC(OCSP_resp_get0_certs) |
109 |
+#endif |
110 |
RESOLVEFUNC(OCSP_basic_sign) |
111 |
RESOLVEFUNC(OCSP_response_create) |
112 |
RESOLVEFUNC(i2d_OCSP_RESPONSE) |
113 |
@@ -1055,12 +1082,14 @@ bool q_resolveOpenSslSymbols() |
74 |
RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey) |
114 |
RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey) |
75 |
RESOLVEFUNC(SSL_CTX_use_PrivateKey_file) |
115 |
RESOLVEFUNC(SSL_CTX_use_PrivateKey_file) |
76 |
RESOLVEFUNC(SSL_CTX_get_cert_store); |
116 |
RESOLVEFUNC(SSL_CTX_get_cert_store); |
77 |
+#if !defined(LIBRESSL_VERSION_NUMBER) |
117 |
+#ifndef LIBRESSL_VERSION_NUMBER |
78 |
RESOLVEFUNC(SSL_CONF_CTX_new); |
118 |
RESOLVEFUNC(SSL_CONF_CTX_new); |
79 |
RESOLVEFUNC(SSL_CONF_CTX_free); |
119 |
RESOLVEFUNC(SSL_CONF_CTX_free); |
80 |
RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx); |
120 |
RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx); |