In an upcoming libssl bump we're going to make SSL_CTX and SSL_CIPHER opaque. The patched Qt in the wkhtmltopdf codebase is prepared for this, but the port's patches forcing the pre-1.1.1 API codepaths will result in a build breakage once we do that. The diff below builds on -current and will continue building after the libssl bump.
I tried to undo as much of the patching of the qsslsocket_openssl bits as possible. This results in a big diff that requires a major bump for wkhtmltox (e.g., SSL_library_init() and SSL_load_error_strings() are removed and OPENSSL_init_ssl() and SSL_CIPHER_get_bits() are added). There are a few patches that could be removed with little effort. I'll look into that some other time. This still works for me in basic testing. Index: Makefile =================================================================== RCS file: /cvs/ports/textproc/wkhtmltopdf/Makefile,v retrieving revision 1.24 diff -u -p -r1.24 Makefile --- Makefile 13 Aug 2020 18:40:38 -0000 1.24 +++ Makefile 29 Apr 2021 18:06:23 -0000 @@ -14,9 +14,9 @@ QT_COMMIT = 5db36ec76b29712eb2c5bd0625c MASTER_SITES0 = https://github.com/wkhtmltopdf/qt/archive/ DISTFILES = ${DISTNAME}.tar.gz \ wkhtmltopdf-qt-${QT_COMMIT}_1{${QT_COMMIT}}.tar.gz:0 -REVISION = 2 +REVISION = 3 -SHARED_LIBS = wkhtmltox 0.0 # 0.12 +SHARED_LIBS = wkhtmltox 1.0 # 0.12 CATEGORIES = textproc Index: patches/patch-qt_src_network_ssl_qsslsocket_openssl_cpp =================================================================== RCS file: /cvs/ports/textproc/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_cpp,v retrieving revision 1.3 diff -u -p -r1.3 patch-qt_src_network_ssl_qsslsocket_openssl_cpp --- patches/patch-qt_src_network_ssl_qsslsocket_openssl_cpp 24 Jul 2018 12:03:11 -0000 1.3 +++ patches/patch-qt_src_network_ssl_qsslsocket_openssl_cpp 29 Apr 2021 18:13:30 -0000 @@ -20,30 +20,7 @@ Index: qt/src/network/ssl/qsslsocket_ope QSslSocketBackendPrivate::QSslSocketBackendPrivate() : ssl(0), ctx(0), -@@ -225,12 +222,9 @@ QSslCipher QSslSocketBackendPrivate::QSslCipher_from_S - ciph.d->encryptionMethod = descriptionList.at(4).mid(4); - ciph.d->exportable = (descriptionList.size() > 6 && descriptionList.at(6) == QLatin1String("export")); - --#if OPENSSL_VERSION_NUMBER < 0x10100000L - ciph.d->bits = cipher->strength_bits; - ciph.d->supportedBits = cipher->alg_bits; --#else -- ciph.d->bits = q_SSL_CIPHER_get_bits(cipher, &ciph.d->supportedBits); --#endif -+ - } - return ciph; - } -@@ -373,7 +367,7 @@ init_context: - // - // See also: QSslContext::fromConfiguration() - if (caCertificate.expiryDate() >= QDateTime::currentDateTime()) { -- q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(ctx), (X509 *)caCertificate.handle()); -+ q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle()); - } - } - -@@ -510,10 +504,8 @@ void QSslSocketBackendPrivate::destroySslContext() +@@ -510,10 +507,8 @@ void QSslSocketBackendPrivate::destroySslContext() */ void QSslSocketPrivate::deinitialize() { @@ -54,7 +31,7 @@ Index: qt/src/network/ssl/qsslsocket_ope } /*! -@@ -534,17 +526,13 @@ bool QSslSocketPrivate::ensureLibraryLoaded() +@@ -534,17 +529,13 @@ bool QSslSocketPrivate::ensureLibraryLoaded() return false; // Check if the library itself needs to be initialized. @@ -72,7 +49,7 @@ Index: qt/src/network/ssl/qsslsocket_ope if (q_SSL_library_init() != 1) return false; q_SSL_load_error_strings(); -@@ -583,9 +571,7 @@ bool QSslSocketPrivate::ensureLibraryLoaded() +@@ -583,9 +574,7 @@ bool QSslSocketPrivate::ensureLibraryLoaded() void QSslSocketPrivate::ensureCiphersAndCertsLoaded() { @@ -83,23 +60,3 @@ Index: qt/src/network/ssl/qsslsocket_ope if (s_loadedCiphersAndCerts) return; s_loadedCiphersAndCerts = true; -@@ -677,18 +663,13 @@ void QSslSocketPrivate::resetDefaultCiphers() - STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl); - for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) { - if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) { -- --#if OPENSSL_VERSION_NUMBER < 0x10100000L -- if (cipher->valid) { --#endif -+ if (cipher->valid) { - QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher); - if (!ciph.isNull()) { - if (!ciph.name().toLower().startsWith(QLatin1String("adh"))) - ciphers << ciph; - } --#if OPENSSL_VERSION_NUMBER < 0x10100000L - } --#endif - } - } - Index: patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols_cpp =================================================================== RCS file: /cvs/ports/textproc/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols_cpp,v retrieving revision 1.3 diff -u -p -r1.3 patch-qt_src_network_ssl_qsslsocket_openssl_symbols_cpp --- patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols_cpp 26 Aug 2018 11:58:36 -0000 1.3 +++ patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols_cpp 29 Apr 2021 18:14:00 -0000 @@ -3,22 +3,8 @@ $OpenBSD: patch-qt_src_network_ssl_qssls Index: qt/src/network/ssl/qsslsocket_openssl_symbols.cpp --- qt/src/network/ssl/qsslsocket_openssl_symbols.cpp.orig +++ qt/src/network/ssl/qsslsocket_openssl_symbols.cpp -@@ -111,28 +111,16 @@ DEFINEFUNC(int, ASN1_STRING_length, ASN1_STRING *a, a, - DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return); - DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return) - DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return) --#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return 0, return) --#else --DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return 0, return) --#endif - DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return 0, return) - DEFINEFUNC3(int, BIO_read, BIO *a, a, void *b, b, int c, c, return -1, return) --#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return) --#else --DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return) --#endif +@@ -125,14 +125,10 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYA + #endif DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return) DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return) -#if OPENSSL_VERSION_NUMBER < 0x10100000L @@ -32,7 +18,7 @@ Index: qt/src/network/ssl/qsslsocket_ope DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG) #if OPENSSL_VERSION_NUMBER < 0x00908000L DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, unsigned char **b, b, long c, c, return 0, return) -@@ -169,7 +157,6 @@ DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKEY, BIO *a, a, +@@ -169,7 +165,6 @@ DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKEY, BIO *a, a, DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG) DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return) DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG) @@ -40,7 +26,7 @@ Index: qt/src/network/ssl/qsslsocket_ope DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return) DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG) #if OPENSSL_VERSION_NUMBER >= 0x10000000L -@@ -179,12 +166,6 @@ DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, r +@@ -179,12 +174,6 @@ DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, r DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG) DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return) #endif @@ -53,78 +39,32 @@ Index: qt/src/network/ssl/qsslsocket_ope DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return) DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return) DEFINEFUNC3(char *, SSL_CIPHER_description, SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return) -@@ -232,12 +213,8 @@ DEFINEFUNC(long, SSL_get_verify_result, const SSL *a, - #else - DEFINEFUNC(long, SSL_get_verify_result, SSL *a, a, return -1, return) - #endif --#if OPENSSL_VERSION_NUMBER < 0x10100000L +@@ -236,7 +225,7 @@ DEFINEFUNC(long, SSL_get_verify_result, SSL *a, a, ret DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return) DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG) --#else + #else -DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return) --#endif ++DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, const void *settings, settings, return -1, return) + #endif DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return) #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) - DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return) -@@ -254,11 +231,7 @@ DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DU - #ifndef OPENSSL_NO_SSL3_METHOD - DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return) - #endif --#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return) --#else --DEFINEFUNC(const SSL_METHOD *, TLS_client_method, DUMMYARG, DUMMYARG, return 0, return) --#endif - DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return) - #ifndef OPENSSL_NO_SSL2 - DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return) -@@ -266,11 +239,7 @@ DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DU - #ifndef OPENSSL_NO_SSL3_METHOD - DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return) - #endif --#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return) --#else --DEFINEFUNC(const SSL_METHOD *, TLS_server_method, DUMMYARG, DUMMYARG, return 0, return) --#endif - DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return) - #else - DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return) -@@ -309,11 +278,7 @@ DEFINEFUNC2(int, X509_STORE_CTX_set_purpose, X509_STOR - DEFINEFUNC(int, X509_STORE_CTX_get_error, X509_STORE_CTX *a, a, return -1, return) - DEFINEFUNC(int, X509_STORE_CTX_get_error_depth, X509_STORE_CTX *a, a, return -1, return) - DEFINEFUNC(X509 *, X509_STORE_CTX_get_current_cert, X509_STORE_CTX *a, a, return 0, return) --#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get_chain, X509_STORE_CTX *a, a, return 0, return) --#else --DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return 0, return) --#endif - DEFINEFUNC(X509_STORE_CTX *, X509_STORE_CTX_new, DUMMYARG, DUMMYARG, return 0, return) - #ifdef SSLEAY_MACROS - DEFINEFUNC2(int, i2d_DSAPrivateKey, const DSA *a, a, unsigned char **b, b, return -1, return) -@@ -321,30 +286,11 @@ DEFINEFUNC2(int, i2d_RSAPrivateKey, const RSA *a, a, u - DEFINEFUNC3(RSA *, d2i_RSAPrivateKey, RSA **a, a, unsigned char **b, b, long c, c, return 0, return) - DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsigned char **b, b, long c, c, return 0, return) - #endif --#if OPENSSL_VERSION_NUMBER < 0x10100000L +@@ -325,7 +314,7 @@ DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsi DEFINEFUNC(void, OPENSSL_add_all_algorithms_noconf, void, DUMMYARG, return, DUMMYARG) DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG) --#else + #else -DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return) --#endif ++DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, const void *settings, settings, return -1, return) + #endif DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return) --#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(long, SSLeay, void, DUMMYARG, return 0, return) --#else --DEFINEFUNC(unsigned long, OpenSSL_version_num, void, DUMMYARG, return 0, return) --#endif --DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *ctx, ctx, return 0, return) + #if OPENSSL_VERSION_NUMBER < 0x10100000L +@@ -336,15 +325,7 @@ DEFINEFUNC(unsigned long, OpenSSL_version_num, void, D + DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *ctx, ctx, return 0, return) --DEFINEFUNC(ASN1_INTEGER *, X509_get_serialNumber, X509 *x, x, return 0, return) + DEFINEFUNC(ASN1_INTEGER *, X509_get_serialNumber, X509 *x, x, return 0, return) -#if OPENSSL_VERSION_NUMBER >= 0x10100000L -DEFINEFUNC(int, EVP_PKEY_id, const EVP_PKEY *pkey, pkey, return 0, return) -DEFINEFUNC(int, EVP_PKEY_base_id, const EVP_PKEY *pkey, pkey, return 0, return) --DEFINEFUNC2(int, SSL_CIPHER_get_bits, const SSL_CIPHER *cipher, cipher, int *alg_bits, alg_bits, return 0, return) + DEFINEFUNC2(int, SSL_CIPHER_get_bits, const SSL_CIPHER *cipher, cipher, int *alg_bits, alg_bits, return 0, return) -DEFINEFUNC2(long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, long options, options, return 0, return) -DEFINEFUNC(long, X509_get_version, X509 *x, x, return 0, return) -DEFINEFUNC(X509_PUBKEY *, X509_get_X509_PUBKEY, X509 *x, x, return 0, return) @@ -133,53 +73,15 @@ Index: qt/src/network/ssl/qsslsocket_ope #if OPENSSL_VERSION_NUMBER < 0x10100000L DEFINEFUNC(ASN1_TIME *, X509_get_notAfter, X509 *x, x, return 0, return) DEFINEFUNC(ASN1_TIME *, X509_get_notBefore, X509 *x, x, return 0, return) -@@ -352,9 +298,6 @@ DEFINEFUNC(ASN1_TIME *, X509_get_notBefore, X509 *x, x - DEFINEFUNC(ASN1_TIME *, X509_getm_notAfter, X509 *x, x, return 0, return) +@@ -353,7 +334,6 @@ DEFINEFUNC(ASN1_TIME *, X509_getm_notAfter, X509 *x, x DEFINEFUNC(ASN1_TIME *, X509_getm_notBefore, X509 *x, x, return 0, return) #endif --DEFINEFUNC4(void, DSA_get0_pqg, const DSA *d, d, const BIGNUM **p, p, const BIGNUM **q, q, const BIGNUM **g, g, return, return) + DEFINEFUNC4(void, DSA_get0_pqg, const DSA *d, d, const BIGNUM **p, p, const BIGNUM **q, q, const BIGNUM **g, g, return, return) -#endif -- + #ifdef Q_OS_SYMBIAN #define RESOLVEFUNC(func, ordinal, lib) \ - if (!(_q_##func = _q_PTR_##func(lib->resolve(#ordinal)))) \ -@@ -648,12 +591,8 @@ bool q_resolveOpenSslSymbols() - static volatile bool symbolsResolved = false; - static volatile bool triedToResolveSymbols = false; - #ifndef QT_NO_THREAD --#if OPENSSL_VERSION_NUMBER < 0x10100000L - QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_SSL_library_init)); --#else -- QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_OPENSSL_init_ssl)); - #endif --#endif - if (symbolsResolved) - return true; - if (triedToResolveSymbols) -@@ -686,11 +625,9 @@ bool q_resolveOpenSslSymbols() - RESOLVEFUNC(BIO_write, 269, libs.second ) - RESOLVEFUNC(BN_num_bits, 387, libs.second ) - RESOLVEFUNC(CRYPTO_free, 469, libs.second ) --#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(CRYPTO_num_locks, 500, libs.second ) - RESOLVEFUNC(CRYPTO_set_id_callback, 513, libs.second ) - RESOLVEFUNC(CRYPTO_set_locking_callback, 516, libs.second ) --#endif - RESOLVEFUNC(DSA_free, 594, libs.second ) - RESOLVEFUNC(ERR_error_string, 744, libs.second ) - RESOLVEFUNC(ERR_get_error, 749, libs.second ) -@@ -748,10 +685,8 @@ bool q_resolveOpenSslSymbols() - RESOLVEFUNC(SSL_get_peer_cert_chain, 117, libs.first ) - RESOLVEFUNC(SSL_get_peer_certificate, 118, libs.first ) - RESOLVEFUNC(SSL_get_verify_result, 132, libs.first ) --#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSL_library_init, 137, libs.first ) - RESOLVEFUNC(SSL_load_error_strings, 139, libs.first ) --#endif - RESOLVEFUNC(SSL_new, 140, libs.first ) - #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) - RESOLVEFUNC(SSL_ctrl, 95, libs.first ) -@@ -823,11 +758,9 @@ bool q_resolveOpenSslSymbols() +@@ -823,11 +803,9 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(BIO_write) RESOLVEFUNC(BN_num_bits) RESOLVEFUNC(CRYPTO_free) @@ -191,7 +93,7 @@ Index: qt/src/network/ssl/qsslsocket_ope RESOLVEFUNC(DSA_free) RESOLVEFUNC(ERR_error_string) RESOLVEFUNC(ERR_get_error) -@@ -857,17 +790,10 @@ bool q_resolveOpenSslSymbols() +@@ -857,17 +835,10 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(RAND_seed) RESOLVEFUNC(RAND_status) RESOLVEFUNC(RSA_free) @@ -209,38 +111,15 @@ Index: qt/src/network/ssl/qsslsocket_ope RESOLVEFUNC(SSL_CIPHER_description) RESOLVEFUNC(SSL_CTX_check_private_key) RESOLVEFUNC(SSL_CTX_ctrl) -@@ -882,7 +808,6 @@ bool q_resolveOpenSslSymbols() - RESOLVEFUNC(SSL_CTX_use_PrivateKey) - RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey) - RESOLVEFUNC(SSL_CTX_use_PrivateKey_file) -- RESOLVEFUNC(SSL_CTX_get_cert_store) - RESOLVEFUNC(SSL_accept) - RESOLVEFUNC(SSL_clear) - RESOLVEFUNC(SSL_connect) -@@ -893,12 +818,8 @@ bool q_resolveOpenSslSymbols() - RESOLVEFUNC(SSL_get_peer_cert_chain) - RESOLVEFUNC(SSL_get_peer_certificate) - RESOLVEFUNC(SSL_get_verify_result) --#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSL_library_init) - RESOLVEFUNC(SSL_load_error_strings) --#else -- RESOLVEFUNC(OPENSSL_init_ssl) --#endif - RESOLVEFUNC(SSL_new) - #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) - RESOLVEFUNC(SSL_ctrl) -@@ -909,19 +830,6 @@ bool q_resolveOpenSslSymbols() - RESOLVEFUNC(SSL_set_connect_state) - RESOLVEFUNC(SSL_shutdown) +@@ -911,17 +882,7 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(SSL_write) -- -- RESOLVEFUNC(X509_get_serialNumber) + + RESOLVEFUNC(X509_get_serialNumber) -#if OPENSSL_VERSION_NUMBER >= 0x10100000L - RESOLVEFUNC(SSL_CTX_ctrl) - RESOLVEFUNC(EVP_PKEY_id) - RESOLVEFUNC(EVP_PKEY_base_id) -- RESOLVEFUNC(SSL_CIPHER_get_bits) + RESOLVEFUNC(SSL_CIPHER_get_bits) - RESOLVEFUNC(SSL_CTX_set_options) - RESOLVEFUNC(X509_get_version) - RESOLVEFUNC(X509_get_X509_PUBKEY) @@ -250,7 +129,7 @@ Index: qt/src/network/ssl/qsslsocket_ope #if OPENSSL_VERSION_NUMBER < 0x10100000L RESOLVEFUNC(X509_get_notAfter) RESOLVEFUNC(X509_get_notBefore) -@@ -929,19 +837,13 @@ bool q_resolveOpenSslSymbols() +@@ -929,8 +890,6 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(X509_getm_notAfter) RESOLVEFUNC(X509_getm_notBefore) #endif @@ -259,57 +138,3 @@ Index: qt/src/network/ssl/qsslsocket_ope #ifndef OPENSSL_NO_SSL2 RESOLVEFUNC(SSLv2_client_method) #endif - #ifndef OPENSSL_NO_SSL3_METHOD - RESOLVEFUNC(SSLv3_client_method) - #endif --#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSLv23_client_method) --#else -- RESOLVEFUNC(TLS_client_method) --#endif - RESOLVEFUNC(TLSv1_client_method) - #ifndef OPENSSL_NO_SSL2 - RESOLVEFUNC(SSLv2_server_method) -@@ -949,11 +851,7 @@ bool q_resolveOpenSslSymbols() - #ifndef OPENSSL_NO_SSL3_METHOD - RESOLVEFUNC(SSLv3_server_method) - #endif --#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSLv23_server_method) --#else -- RESOLVEFUNC(TLS_server_method) --#endif - RESOLVEFUNC(TLSv1_server_method) - RESOLVEFUNC(X509_NAME_entry_count) - RESOLVEFUNC(X509_NAME_get_entry) -@@ -970,11 +868,7 @@ bool q_resolveOpenSslSymbols() - RESOLVEFUNC(X509_STORE_CTX_get_error) - RESOLVEFUNC(X509_STORE_CTX_get_error_depth) - RESOLVEFUNC(X509_STORE_CTX_get_current_cert) --#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(X509_STORE_CTX_get_chain) --#else -- RESOLVEFUNC(X509_STORE_CTX_get0_chain) --#endif - RESOLVEFUNC(X509_cmp) - #ifndef SSLEAY_MACROS - RESOLVEFUNC(X509_dup) -@@ -995,18 +889,10 @@ bool q_resolveOpenSslSymbols() - RESOLVEFUNC(d2i_DSAPrivateKey) - RESOLVEFUNC(d2i_RSAPrivateKey) - #endif --#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(OPENSSL_add_all_algorithms_noconf) - RESOLVEFUNC(OPENSSL_add_all_algorithms_conf) --#else -- RESOLVEFUNC(OPENSSL_init_crypto) --#endif - RESOLVEFUNC(SSL_CTX_load_verify_locations) --#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSLeay) --#else -- RESOLVEFUNC(OpenSSL_version_num) --#endif - #endif // Q_OS_SYMBIAN - symbolsResolved = true; - delete libs.first; Index: patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols_p_h =================================================================== RCS file: /cvs/ports/textproc/wkhtmltopdf/patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols_p_h,v retrieving revision 1.2 diff -u -p -r1.2 patch-qt_src_network_ssl_qsslsocket_openssl_symbols_p_h --- patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols_p_h 26 Aug 2018 11:58:36 -0000 1.2 +++ patches/patch-qt_src_network_ssl_qsslsocket_openssl_symbols_p_h 22 Apr 2021 15:20:55 -0000 @@ -3,22 +3,8 @@ $OpenBSD: patch-qt_src_network_ssl_qssls Index: qt/src/network/ssl/qsslsocket_openssl_symbols_p.h --- qt/src/network/ssl/qsslsocket_openssl_symbols_p.h.orig +++ qt/src/network/ssl/qsslsocket_openssl_symbols_p.h -@@ -207,31 +207,16 @@ int q_ASN1_STRING_length(ASN1_STRING *a); - int q_ASN1_STRING_to_UTF8(unsigned char **a, ASN1_STRING *b); - long q_BIO_ctrl(BIO *a, int b, long c, void *d); - int q_BIO_free(BIO *a); --#if OPENSSL_VERSION_NUMBER < 0x10100000L - BIO *q_BIO_new(BIO_METHOD *a); --#else --BIO *q_BIO_new(const BIO_METHOD *a); --#endif - BIO *q_BIO_new_mem_buf(void *a, int b); - int q_BIO_read(BIO *a, void *b, int c); --#if OPENSSL_VERSION_NUMBER < 0x10100000L - BIO_METHOD *q_BIO_s_mem(); --#else --const BIO_METHOD *q_BIO_s_mem(); --#endif +@@ -221,17 +221,10 @@ const BIO_METHOD *q_BIO_s_mem(); + #endif int q_BIO_write(BIO *a, const void *b, int c); int q_BN_num_bits(const BIGNUM *a); -#if OPENSSL_VERSION_NUMBER < 0x10100000L @@ -35,7 +21,7 @@ Index: qt/src/network/ssl/qsslsocket_ope void q_DSA_free(DSA *a); #if OPENSSL_VERSION_NUMBER >= 0x00908000L // 0.9.8 broke SC and BC by changing this function's signature. -@@ -273,7 +258,6 @@ int q_PEM_write_bio_RSA_PUBKEY(BIO *a, RSA *b); +@@ -273,7 +266,6 @@ int q_PEM_write_bio_RSA_PUBKEY(BIO *a, RSA *b); void q_RAND_seed(const void *a, int b); int q_RAND_status(); void q_RSA_free(RSA *a); @@ -43,7 +29,7 @@ Index: qt/src/network/ssl/qsslsocket_ope int q_sk_num(STACK *a); void q_sk_pop_free(STACK *a, void (*b)(void *)); #if OPENSSL_VERSION_NUMBER >= 0x10000000L -@@ -283,16 +267,6 @@ void * q_sk_value(STACK *a, int b); +@@ -283,16 +275,6 @@ void * q_sk_value(STACK *a, int b); void q_sk_free(STACK *a); char * q_sk_value(STACK *a, int b); #endif @@ -60,63 +46,22 @@ Index: qt/src/network/ssl/qsslsocket_ope int q_SSL_accept(SSL *a); int q_SSL_clear(SSL *a); char *q_SSL_CIPHER_description(SSL_CIPHER *a, char *b, int c); -@@ -340,14 +314,8 @@ long q_SSL_get_verify_result(const SSL *a); - #else - long q_SSL_get_verify_result(SSL *a); - #endif --#if OPENSSL_VERSION_NUMBER < 0x10100000L +@@ -344,7 +326,7 @@ long q_SSL_get_verify_result(SSL *a); int q_SSL_library_init(); void q_SSL_load_error_strings(); --#else --int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); --#define q_SSL_library_init() q_OPENSSL_init_ssl(0, NULL) --#define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL) --#endif - SSL *q_SSL_new(SSL_CTX *a); - #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) - long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg); -@@ -360,21 +328,11 @@ int q_SSL_shutdown(SSL *a); - #if OPENSSL_VERSION_NUMBER >= 0x10000000L - const SSL_METHOD *q_SSLv2_client_method(); - const SSL_METHOD *q_SSLv3_client_method(); --#if OPENSSL_VERSION_NUMBER < 0x10100000L - const SSL_METHOD *q_SSLv23_client_method(); --#else --const SSL_METHOD *q_TLS_client_method(); --#define q_SSLv23_client_method q_TLS_client_method --#endif - const SSL_METHOD *q_TLSv1_client_method(); - const SSL_METHOD *q_SSLv2_server_method(); - const SSL_METHOD *q_SSLv3_server_method(); --#if OPENSSL_VERSION_NUMBER < 0x10100000L - const SSL_METHOD *q_SSLv23_server_method(); --#else --const SSL_METHOD *q_TLS_server_method(); --#define q_SSLv23_server_method q_TLS_server_method --#endif - const SSL_METHOD *q_TLSv1_server_method(); #else - SSL_METHOD *q_SSLv2_client_method(); -@@ -419,12 +377,7 @@ int q_X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, - int q_X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); - int q_X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); - X509 *q_X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); --#if OPENSSL_VERSION_NUMBER < 0x10100000L - STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx); --#else --STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx); --#define q_X509_STORE_CTX_get_chain q_X509_STORE_CTX_get0_chain --#endif - - #define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp) - #define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL) -@@ -446,25 +399,7 @@ DSA *q_d2i_DSAPrivateKey(DSA **a, unsigned char **pp, +-int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); ++int q_OPENSSL_init_ssl(uint64_t opts, const void *settings); + #define q_SSL_library_init() q_OPENSSL_init_ssl(0, NULL) + #define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL) + #endif +@@ -446,25 +428,10 @@ DSA *q_d2i_DSAPrivateKey(DSA **a, unsigned char **pp, PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_DSAPrivateKey,PEM_STRING_DSA,\ bp,(char *)x,enc,kstr,klen,cb,u) #endif - --X509_STORE * q_SSL_CTX_get_cert_store(const SSL_CTX *ctx); --ASN1_INTEGER * q_X509_get_serialNumber(X509 *x); + X509_STORE * q_SSL_CTX_get_cert_store(const SSL_CTX *ctx); + ASN1_INTEGER * q_X509_get_serialNumber(X509 *x); - -#if OPENSSL_VERSION_NUMBER < 0x10100000L #define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL) @@ -124,7 +69,7 @@ Index: qt/src/network/ssl/qsslsocket_ope -#else -int q_EVP_PKEY_id(const EVP_PKEY *pkey); -int q_EVP_PKEY_base_id(const EVP_PKEY *pkey); --int q_SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits); + int q_SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits); -long q_SSL_CTX_set_options(SSL_CTX *ctx, long options); -long q_X509_get_version(X509 *x); -X509_PUBKEY * q_X509_get_X509_PUBKEY(X509 *x); @@ -136,25 +81,12 @@ Index: qt/src/network/ssl/qsslsocket_ope #define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st) #define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i) #define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st)) -@@ -495,21 +430,10 @@ ASN1_TIME *q_X509_getm_notBefore(X509 *x); - #else - #define q_OpenSSL_add_all_algorithms() q_OPENSSL_add_all_algorithms_noconf() - #endif --#if OPENSSL_VERSION_NUMBER < 0x10100000L +@@ -499,7 +466,7 @@ ASN1_TIME *q_X509_getm_notBefore(X509 *x); void q_OPENSSL_add_all_algorithms_noconf(); void q_OPENSSL_add_all_algorithms_conf(); --#else + #else -int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); --#define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CONFIG, NULL) --# define q_OPENSSL_add_all_algorithms_noconf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL) --#endif - int q_SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath); --#if OPENSSL_VERSION_NUMBER < 0x10100000L - long q_SSLeay(); --#else --unsigned long q_OpenSSL_version_num(); --#define q_SSLeay q_OpenSSL_version_num --#endif - - // Helper function - class QDateTime; ++int q_OPENSSL_init_crypto(uint64_t opts, const void *settings); + #define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CONFIG, NULL) + # define q_OPENSSL_add_all_algorithms_noconf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, NULL) + #endif