mirror of
https://git.suyu.dev/suyu/flatpak.git
synced 2026-01-02 12:44:28 +01:00
Init
This commit is contained in:
commit
e571c4fbe8
139 changed files with 8839 additions and 0 deletions
54
shared-modules/qt4/disable-sslv3.patch
Normal file
54
shared-modules/qt4/disable-sslv3.patch
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
diff -u -r qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp qt-everywhere-opensource-src-4.8.7-nossl3/src/network/ssl/qsslsocket_openssl.cpp
|
||||
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp 2015-05-07 16:14:44.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.8.7-nossl3/src/network/ssl/qsslsocket_openssl.cpp 2016-03-04 11:29:17.119300898 +0100
|
||||
@@ -267,7 +267,11 @@
|
||||
#endif
|
||||
break;
|
||||
case QSsl::SslV3:
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
|
||||
+#else
|
||||
+ ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error
|
||||
+#endif
|
||||
break;
|
||||
case QSsl::SecureProtocols: // SslV2 will be disabled below
|
||||
case QSsl::TlsV1SslV3: // SslV2 will be disabled below
|
||||
diff -u -r qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp qt-everywhere-opensource-src-4.8.7-nossl3/src/network/ssl/qsslsocket_openssl_symbols.cpp
|
||||
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-05-07 16:14:44.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.8.7-nossl3/src/network/ssl/qsslsocket_openssl_symbols.cpp 2016-03-04 11:28:52.806050135 +0100
|
||||
@@ -228,13 +228,17 @@
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
|
||||
#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
|
||||
+#endif
|
||||
DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
|
||||
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)
|
||||
#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
|
||||
+#endif
|
||||
DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
|
||||
DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
|
||||
#else
|
||||
@@ -822,13 +826,17 @@
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
RESOLVEFUNC(SSLv2_client_method)
|
||||
#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
RESOLVEFUNC(SSLv3_client_method)
|
||||
+#endif
|
||||
RESOLVEFUNC(SSLv23_client_method)
|
||||
RESOLVEFUNC(TLSv1_client_method)
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
RESOLVEFUNC(SSLv2_server_method)
|
||||
#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
RESOLVEFUNC(SSLv3_server_method)
|
||||
+#endif
|
||||
RESOLVEFUNC(SSLv23_server_method)
|
||||
RESOLVEFUNC(TLSv1_server_method)
|
||||
RESOLVEFUNC(X509_NAME_entry_count)
|
||||
11
shared-modules/qt4/fixgcc11.patch
Normal file
11
shared-modules/qt4/fixgcc11.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/tools/linguist/linguist/messagemodel.cpp 2021-06-07 12:18:43.713434493 +0200
|
||||
+++ b/tools/linguist/linguist/messagemodel.cpp 2021-06-07 12:24:24.828016548 +0200
|
||||
@@ -183,7 +183,7 @@
|
||||
if (ContextItem *c = one->findContext(oc->context())) {
|
||||
for (int j = 0; j < oc->messageCount(); ++j) {
|
||||
MessageItem *m = oc->messageItem(j);
|
||||
- if (c->findMessage(m->text(), m->comment()) >= 0)
|
||||
+ if (c->findMessage(m->text(), m->comment()))
|
||||
++inBoth;
|
||||
}
|
||||
}
|
||||
31
shared-modules/qt4/fixgcc9.patch
Normal file
31
shared-modules/qt4/fixgcc9.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
--- qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h 2015-05-07 16:14:48.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.8.7-gcc9/src/corelib/global/qglobal.h 2020-05-28 16:24:45.160340385 +0200
|
||||
@@ -2482,22 +2482,22 @@
|
||||
|
||||
#endif /* Q_NO_TYPESAFE_FLAGS */
|
||||
|
||||
-#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_RVCT)
|
||||
+#if (defined(Q_CC_GNU) && !defined(Q_CC_RVCT))
|
||||
/* make use of typeof-extension */
|
||||
template <typename T>
|
||||
class QForeachContainer {
|
||||
public:
|
||||
- inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { }
|
||||
+ inline QForeachContainer(const T& t) : c(t), i(c.begin()), e(c.end()), control(1) { }
|
||||
const T c;
|
||||
- int brk;
|
||||
typename T::const_iterator i, e;
|
||||
+ int control;
|
||||
};
|
||||
|
||||
#define Q_FOREACH(variable, container) \
|
||||
for (QForeachContainer<__typeof__(container)> _container_(container); \
|
||||
- !_container_.brk && _container_.i != _container_.e; \
|
||||
- __extension__ ({ ++_container_.brk; ++_container_.i; })) \
|
||||
- for (variable = *_container_.i;; __extension__ ({--_container_.brk; break;}))
|
||||
+ _container_.control && _container_.i != _container_.e; \
|
||||
+ ++_container_.i, _container_.control ^= 1) \
|
||||
+ for (variable = *_container_.i; _container_.control; _container_.control = 0)
|
||||
|
||||
#else
|
||||
|
||||
118
shared-modules/qt4/qt4-4.8.7-minimal.json
Normal file
118
shared-modules/qt4/qt4-4.8.7-minimal.json
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
"name": "qt4",
|
||||
"config-opts": [
|
||||
"-verbose",
|
||||
"-confirm-license",
|
||||
"-opensource",
|
||||
"-release",
|
||||
"-shared",
|
||||
"-no-static",
|
||||
"-fast",
|
||||
"-datadir", "/app/lib/qt4",
|
||||
"-importdir", "/app/lib/qt4/imports",
|
||||
"-plugindir", "/app/lib/qt4/plugins",
|
||||
"-translationdir", "/app/share/qt4/translations",
|
||||
"-accessibility",
|
||||
"-exceptions",
|
||||
"-fontconfig",
|
||||
"-glib",
|
||||
"-dbus-linked",
|
||||
"-openssl-linked",
|
||||
"-optimized-qmake",
|
||||
"-system-libjpeg",
|
||||
"-system-libpng",
|
||||
"-system-libtiff",
|
||||
"-system-proxies",
|
||||
"-system-zlib",
|
||||
"-no-cups",
|
||||
"-no-declarative",
|
||||
"-no-gtkstyle",
|
||||
"-no-javascript-jit",
|
||||
"-no-libmng",
|
||||
"-no-multimedia",
|
||||
"-no-nis",
|
||||
"-no-opengl",
|
||||
"-no-phonon",
|
||||
"-no-phonon-backend",
|
||||
"-no-qt3support",
|
||||
"-no-rpath",
|
||||
"-no-script",
|
||||
"-no-scripttools",
|
||||
"-no-sql-db2",
|
||||
"-no-sql-ibase",
|
||||
"-no-sql-mysql",
|
||||
"-no-sql-oci",
|
||||
"-no-sql-odbc",
|
||||
"-no-sql-psql",
|
||||
"-no-sql-sqlite",
|
||||
"-no-sql-sqlite2",
|
||||
"-no-sql-sqlite_symbian",
|
||||
"-no-sql-symsql",
|
||||
"-no-sql-tds",
|
||||
"-no-svg",
|
||||
"-no-webkit",
|
||||
"-no-xmlpatterns",
|
||||
"-nomake", "demos",
|
||||
"-nomake", "docs",
|
||||
"-nomake", "examples"
|
||||
],
|
||||
"build-options": {
|
||||
"env": {
|
||||
"CXXFLAGS": "-std=gnu++98 -O2",
|
||||
"LD_LIBRARY_PATH": "/run/build/qt4/lib/"
|
||||
}
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz",
|
||||
"sha256": "e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"path": "qt4-aarch64.patch"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"path": "disable-sslv3.patch"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"path": "fixgcc9.patch"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"path": "fixgcc11.patch"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"commands": [
|
||||
"sed -i \"s|-O2|${CXXFLAGS}|\" mkspecs/common/{g++,gcc}-base.conf",
|
||||
"sed -i \"/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g\" mkspecs/common/gcc-base-unix.conf",
|
||||
"sed -i \"/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g\" mkspecs/common/gcc-base.conf"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "file",
|
||||
"path": "qt4-openssl-1.1.patch"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"commands": [
|
||||
"echo -e '#include<openssl/opensslv.h>\nint main(){return OPENSSL_VERSION_NUMBER>=0x010100000L?0:1;}' >has_openssl_1_1.c",
|
||||
"gcc ${CFLAGS} has_openssl_1_1.c -o has_openssl_1_1",
|
||||
"if ./has_openssl_1_1; then patch -p1 -i qt4-openssl-1.1.patch; fi"
|
||||
]
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
"/bin",
|
||||
"/include",
|
||||
"/lib/*.a",
|
||||
"/lib/*.la",
|
||||
"/lib/*.prl",
|
||||
"/lib/pkgconfig",
|
||||
"/lib/qt4/mkspecs",
|
||||
"/lib/qt4/q3porting.xml"
|
||||
]
|
||||
}
|
||||
514
shared-modules/qt4/qt4-aarch64.patch
Normal file
514
shared-modules/qt4/qt4-aarch64.patch
Normal file
File diff suppressed because one or more lines are too long
409
shared-modules/qt4/qt4-openssl-1.1.patch
Normal file
409
shared-modules/qt4/qt4-openssl-1.1.patch
Normal file
|
|
@ -0,0 +1,409 @@
|
|||
Description: Compile with openssl-1.1.0
|
||||
* Most changes are related to openssl structures are now opaque.
|
||||
* The network/ssl threading setup has been disabled because the
|
||||
old openssl threading model has been removed and is apparently
|
||||
no longer needed.
|
||||
* A number of new functions had to be imported (see changes to
|
||||
src/network/ssl/qsslsocket_openssl_symbols.cpp)
|
||||
Author: Gert Wollny <gw.fossdev@gmail.com>
|
||||
Last-Update: 2016-06-28
|
||||
Bug-Debian: http://bugs.debian.org/828522
|
||||
|
||||
--- a/src/network/ssl/qsslcertificate.cpp
|
||||
+++ b/src/network/ssl/qsslcertificate.cpp
|
||||
@@ -259,10 +259,10 @@
|
||||
QByteArray QSslCertificate::version() const
|
||||
{
|
||||
QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
|
||||
- if (d->versionString.isEmpty() && d->x509)
|
||||
+ if (d->versionString.isEmpty() && d->x509) {
|
||||
d->versionString =
|
||||
- QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1);
|
||||
-
|
||||
+ QByteArray::number(qlonglong(q_X509_get_version(d->x509)) + 1);
|
||||
+ }
|
||||
return d->versionString;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
{
|
||||
QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
|
||||
if (d->serialNumberString.isEmpty() && d->x509) {
|
||||
- ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber;
|
||||
+ ASN1_INTEGER *serialNumber = q_X509_get_serialNumber(d->x509);
|
||||
// if we cannot convert to a long, just output the hexadecimal number
|
||||
if (serialNumber->length > 4) {
|
||||
QByteArray hexString;
|
||||
@@ -489,24 +489,33 @@
|
||||
QSslKey key;
|
||||
|
||||
key.d->type = QSsl::PublicKey;
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
X509_PUBKEY *xkey = d->x509->cert_info->key;
|
||||
+#else
|
||||
+ X509_PUBKEY *xkey = q_X509_get_X509_PUBKEY(d->x509);
|
||||
+#endif
|
||||
EVP_PKEY *pkey = q_X509_PUBKEY_get(xkey);
|
||||
Q_ASSERT(pkey);
|
||||
|
||||
- if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) {
|
||||
+ int key_id;
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+ key_id = q_EVP_PKEY_type(pkey->type);
|
||||
+#else
|
||||
+ key_id = q_EVP_PKEY_base_id(pkey);
|
||||
+#endif
|
||||
+ if (key_id == EVP_PKEY_RSA) {
|
||||
key.d->rsa = q_EVP_PKEY_get1_RSA(pkey);
|
||||
key.d->algorithm = QSsl::Rsa;
|
||||
key.d->isNull = false;
|
||||
- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) {
|
||||
+ } else if (key_id == EVP_PKEY_DSA) {
|
||||
key.d->dsa = q_EVP_PKEY_get1_DSA(pkey);
|
||||
key.d->algorithm = QSsl::Dsa;
|
||||
key.d->isNull = false;
|
||||
- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) {
|
||||
+ } else if (key_id == EVP_PKEY_DH) {
|
||||
// DH unsupported
|
||||
} else {
|
||||
// error?
|
||||
}
|
||||
-
|
||||
q_EVP_PKEY_free(pkey);
|
||||
return key;
|
||||
}
|
||||
--- a/src/network/ssl/qsslkey.cpp
|
||||
+++ b/src/network/ssl/qsslkey.cpp
|
||||
@@ -321,8 +321,19 @@
|
||||
{
|
||||
if (d->isNull)
|
||||
return -1;
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
return (d->algorithm == QSsl::Rsa)
|
||||
? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p);
|
||||
+#else
|
||||
+ if (d->algorithm == QSsl::Rsa) {
|
||||
+ return q_RSA_bits(d->rsa);
|
||||
+ }else{
|
||||
+ BIGNUM *p = NULL;
|
||||
+ q_DSA_get0_pqg(d->dsa, &p, NULL, NULL);
|
||||
+ return q_BN_num_bits(p);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
}
|
||||
|
||||
/*!
|
||||
--- a/src/network/ssl/qsslsocket_openssl.cpp
|
||||
+++ b/src/network/ssl/qsslsocket_openssl.cpp
|
||||
@@ -93,6 +93,7 @@
|
||||
bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
|
||||
bool QSslSocketPrivate::s_loadRootCertsOnDemand = false;
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
/* \internal
|
||||
|
||||
From OpenSSL's thread(3) manual page:
|
||||
@@ -174,6 +175,8 @@
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
+#endif //OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+
|
||||
QSslSocketBackendPrivate::QSslSocketBackendPrivate()
|
||||
: ssl(0),
|
||||
ctx(0),
|
||||
@@ -222,9 +225,12 @@
|
||||
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;
|
||||
}
|
||||
@@ -367,7 +373,7 @@
|
||||
//
|
||||
// See also: QSslContext::fromConfiguration()
|
||||
if (caCertificate.expiryDate() >= QDateTime::currentDateTime()) {
|
||||
- q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle());
|
||||
+ q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(ctx), (X509 *)caCertificate.handle());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,8 +510,10 @@
|
||||
*/
|
||||
void QSslSocketPrivate::deinitialize()
|
||||
{
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
q_CRYPTO_set_id_callback(0);
|
||||
q_CRYPTO_set_locking_callback(0);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -526,13 +534,17 @@
|
||||
return false;
|
||||
|
||||
// Check if the library itself needs to be initialized.
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
QMutexLocker locker(openssl_locks()->initLock());
|
||||
+#endif
|
||||
if (!s_libraryLoaded) {
|
||||
s_libraryLoaded = true;
|
||||
|
||||
// Initialize OpenSSL.
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
q_CRYPTO_set_id_callback(id_function);
|
||||
q_CRYPTO_set_locking_callback(locking_function);
|
||||
+#endif
|
||||
if (q_SSL_library_init() != 1)
|
||||
return false;
|
||||
q_SSL_load_error_strings();
|
||||
@@ -571,7 +583,9 @@
|
||||
|
||||
void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
|
||||
{
|
||||
- QMutexLocker locker(openssl_locks()->initLock());
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+ QMutexLocker locker(openssl_locks()->initLock());
|
||||
+#endif
|
||||
if (s_loadedCiphersAndCerts)
|
||||
return;
|
||||
s_loadedCiphersAndCerts = true;
|
||||
@@ -663,13 +677,18 @@
|
||||
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 (cipher->valid) {
|
||||
+
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+ if (cipher->valid) {
|
||||
+#endif
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
|
||||
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
|
||||
@@ -399,7 +399,25 @@
|
||||
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);
|
||||
+
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
|
||||
+#define q_X509_get_version(x) X509_get_version(x)
|
||||
+#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);
|
||||
+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);
|
||||
+int q_RSA_bits(const RSA *rsa);
|
||||
+int q_DSA_security_bits(const DSA *dsa);
|
||||
+void q_DSA_get0_pqg(const DSA *d, BIGNUM **p, BIGNUM **q, BIGNUM **g);
|
||||
+#endif
|
||||
+
|
||||
#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))
|
||||
@@ -410,8 +428,15 @@
|
||||
#define q_sk_SSL_CIPHER_value(st, i) q_SKM_sk_value(SSL_CIPHER, (st), (i))
|
||||
#define q_SSL_CTX_add_extra_chain_cert(ctx,x509) \
|
||||
q_SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
|
||||
+
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#define q_X509_get_notAfter(x) X509_get_notAfter(x)
|
||||
#define q_X509_get_notBefore(x) X509_get_notBefore(x)
|
||||
+#else
|
||||
+ASN1_TIME *q_X509_get_notAfter(X509 *x);
|
||||
+ASN1_TIME *q_X509_get_notBefore(X509 *x);
|
||||
+#endif
|
||||
+
|
||||
#define q_EVP_PKEY_assign_RSA(pkey,rsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
|
||||
(char *)(rsa))
|
||||
#define q_EVP_PKEY_assign_DSA(pkey,dsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\
|
||||
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
|
||||
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
|
||||
@@ -290,6 +290,22 @@
|
||||
DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG)
|
||||
DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return)
|
||||
DEFINEFUNC(long, SSLeay, void, DUMMYARG, return 0, return)
|
||||
+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)
|
||||
+#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(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)
|
||||
+DEFINEFUNC(int, RSA_bits, const RSA *rsa, rsa, return 0, return)
|
||||
+DEFINEFUNC(int, DSA_security_bits, const DSA *dsa, dsa, return 0, return)
|
||||
+DEFINEFUNC(ASN1_TIME *, X509_get_notAfter, X509 *x, x, return 0, return)
|
||||
+DEFINEFUNC(ASN1_TIME *, X509_get_notBefore, X509 *x, x, return 0, return)
|
||||
+DEFINEFUNC4(void, DSA_get0_pqg, const DSA *d, d, BIGNUM **p, p, BIGNUM **q, q, BIGNUM **g, g, return, return)
|
||||
+#endif
|
||||
|
||||
#ifdef Q_OS_SYMBIAN
|
||||
#define RESOLVEFUNC(func, ordinal, lib) \
|
||||
@@ -801,6 +817,7 @@
|
||||
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)
|
||||
@@ -823,6 +840,23 @@
|
||||
RESOLVEFUNC(SSL_set_connect_state)
|
||||
RESOLVEFUNC(SSL_shutdown)
|
||||
RESOLVEFUNC(SSL_write)
|
||||
+
|
||||
+ 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_CTX_set_options)
|
||||
+ RESOLVEFUNC(X509_get_version)
|
||||
+ RESOLVEFUNC(X509_get_X509_PUBKEY)
|
||||
+ RESOLVEFUNC(RSA_bits)
|
||||
+ RESOLVEFUNC(DSA_security_bits)
|
||||
+ RESOLVEFUNC(DSA_get0_pqg)
|
||||
+ RESOLVEFUNC(X509_get_notAfter)
|
||||
+ RESOLVEFUNC(X509_get_notBefore)
|
||||
+#endif
|
||||
+
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
RESOLVEFUNC(SSLv2_client_method)
|
||||
#endif
|
||||
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslkey.cpp.0131~ 2017-03-15 02:22:37.053244125 +0100
|
||||
+++ qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslkey.cpp 2017-03-15 02:22:37.055244057 +0100
|
||||
@@ -328,7 +328,7 @@ int QSslKey::length() const
|
||||
if (d->algorithm == QSsl::Rsa) {
|
||||
return q_RSA_bits(d->rsa);
|
||||
}else{
|
||||
- BIGNUM *p = NULL;
|
||||
+ const BIGNUM *p = NULL;
|
||||
q_DSA_get0_pqg(d->dsa, &p, NULL, NULL);
|
||||
return q_BN_num_bits(p);
|
||||
}
|
||||
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp.0131~ 2017-03-15 02:22:37.054244091 +0100
|
||||
+++ qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-03-15 02:29:41.155236836 +0100
|
||||
@@ -111,16 +111,16 @@ DEFINEFUNC(int, ASN1_STRING_length, ASN1
|
||||
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)
|
||||
-DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return 0, return)
|
||||
+DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return 0, return)
|
||||
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)
|
||||
-DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
|
||||
+DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
|
||||
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)
|
||||
DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
|
||||
DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
|
||||
DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
|
||||
-DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
|
||||
+DEFINEFUNC(void, OPENSSL_free, void *a, a, return, DUMMYARG)
|
||||
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)
|
||||
@@ -300,7 +300,7 @@ DEFINEFUNC(int, RSA_bits, const RSA *rs
|
||||
DEFINEFUNC(int, DSA_security_bits, const DSA *dsa, dsa, return 0, return)
|
||||
DEFINEFUNC(ASN1_TIME *, X509_get_notAfter, X509 *x, x, return 0, return)
|
||||
DEFINEFUNC(ASN1_TIME *, X509_get_notBefore, X509 *x, x, return 0, return)
|
||||
-DEFINEFUNC4(void, DSA_get0_pqg, const DSA *d, d, BIGNUM **p, p, BIGNUM **q, q, 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
|
||||
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols_p.h.0131~ 2017-03-15 02:22:37.054244091 +0100
|
||||
+++ qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-03-15 02:29:50.192986268 +0100
|
||||
@@ -59,6 +59,9 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#define DUMMYARG
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
+#define OPENSSL_NO_SSL2 1
|
||||
+#endif
|
||||
|
||||
#if !defined QT_LINKED_OPENSSL
|
||||
// **************** Shared declarations ******************
|
||||
@@ -207,16 +210,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);
|
||||
-BIO *q_BIO_new(BIO_METHOD *a);
|
||||
+BIO *q_BIO_new(const BIO_METHOD *a);
|
||||
BIO *q_BIO_new_mem_buf(void *a, int b);
|
||||
int q_BIO_read(BIO *a, void *b, int c);
|
||||
-BIO_METHOD *q_BIO_s_mem();
|
||||
+const BIO_METHOD *q_BIO_s_mem();
|
||||
int q_BIO_write(BIO *a, const void *b, int c);
|
||||
int q_BN_num_bits(const BIGNUM *a);
|
||||
int q_CRYPTO_num_locks();
|
||||
void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int));
|
||||
void q_CRYPTO_set_id_callback(unsigned long (*a)());
|
||||
-void q_CRYPTO_free(void *a);
|
||||
+void q_OPENSSL_free(void *a);
|
||||
void q_DSA_free(DSA *a);
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x00908000L
|
||||
// 0.9.8 broke SC and BC by changing this function's signature.
|
||||
@@ -326,7 +329,6 @@ void q_SSL_set_accept_state(SSL *a);
|
||||
void q_SSL_set_connect_state(SSL *a);
|
||||
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();
|
||||
const SSL_METHOD *q_SSLv23_client_method();
|
||||
const SSL_METHOD *q_TLSv1_client_method();
|
||||
@@ -335,7 +337,6 @@ const SSL_METHOD *q_SSLv3_server_method(
|
||||
const SSL_METHOD *q_SSLv23_server_method();
|
||||
const SSL_METHOD *q_TLSv1_server_method();
|
||||
#else
|
||||
-SSL_METHOD *q_SSLv2_client_method();
|
||||
SSL_METHOD *q_SSLv3_client_method();
|
||||
SSL_METHOD *q_SSLv23_client_method();
|
||||
SSL_METHOD *q_TLSv1_client_method();
|
||||
@@ -415,7 +416,7 @@ long q_X509_get_version(X509 *x);
|
||||
X509_PUBKEY * q_X509_get_X509_PUBKEY(X509 *x);
|
||||
int q_RSA_bits(const RSA *rsa);
|
||||
int q_DSA_security_bits(const DSA *dsa);
|
||||
-void q_DSA_get0_pqg(const DSA *d, BIGNUM **p, BIGNUM **q, BIGNUM **g);
|
||||
+void q_DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
|
||||
#endif
|
||||
|
||||
#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
|
||||
--- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslcertificate.cpp.omv~ 2017-03-15 02:27:18.143322736 +0100
|
||||
+++ qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslcertificate.cpp 2017-03-15 02:29:56.215819741 +0100
|
||||
@@ -696,7 +696,7 @@
|
||||
unsigned char *data = 0;
|
||||
int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
|
||||
info[QString::fromUtf8(obj)] = QString::fromUtf8((char*)data, size);
|
||||
- q_CRYPTO_free(data);
|
||||
+ q_OPENSSL_free(data);
|
||||
}
|
||||
return info;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue