A simple Qt based browser with no bullshit that supports PKCS#11 tokens (such as the SuisseID).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

306 lines
13 KiB

diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qhttpnetworkconnectionchannel.cpp qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qhttpnetworkconnectionchannel.cpp
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qhttpnetworkconnectionchannel.cpp 2010-11-06 02:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qhttpnetworkconnectionchannel.cpp 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -130,6 +130,9 @@
14 years ago
QObject::connect(sslSocket, SIGNAL(encryptedBytesWritten(qint64)),
this, SLOT(_q_encryptedBytesWritten(qint64)),
Qt::DirectConnection);
14 years ago
+ QObject::connect(sslSocket, SIGNAL(extendedContextInitialization(ssl_ctx_st*)),
14 years ago
+ this, SLOT(_q_extendedContextInitialization(ssl_ctx_st*)),
14 years ago
+ Qt::DirectConnection);
14 years ago
}
#endif
}
14 years ago
@@ -1027,6 +1030,13 @@
14 years ago
emit connection->sslErrors(errors);
}
+void QHttpNetworkConnectionChannel::_q_extendedContextInitialization(ssl_ctx_st* ctx)
+{
+ if (!socket)
+ return;
14 years ago
+ emit connection->extendedContextInitialization(ctx, qobject_cast<QSslSocket*>(socket));
14 years ago
+}
+
14 years ago
void QHttpNetworkConnectionChannel::_q_encryptedBytesWritten(qint64 bytes)
{
Q_UNUSED(bytes);
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qhttpnetworkconnectionchannel_p.h qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qhttpnetworkconnectionchannel_p.h
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qhttpnetworkconnectionchannel_p.h 2010-11-06 02:55:18.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qhttpnetworkconnectionchannel_p.h 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -76,6 +76,10 @@
# include <QtNetwork/qtcpsocket.h>
#endif
+#ifndef QT_NO_OPENSSL
+struct ssl_ctx_st;
14 years ago
+#endif
+
QT_BEGIN_NAMESPACE
14 years ago
class QHttpNetworkRequest;
@@ -175,6 +179,7 @@
#ifndef QT_NO_OPENSSL
void _q_encrypted(); // start sending request (https)
void _q_sslErrors(const QList<QSslError> &errors); // ssl errors from the socket
14 years ago
+ void _q_extendedContextInitialization(ssl_ctx_st *ctx);
14 years ago
void _q_encryptedBytesWritten(qint64 bytes); // proceed sending
#endif
};
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qhttpnetworkconnection_p.h qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qhttpnetworkconnection_p.h
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qhttpnetworkconnection_p.h 2010-11-06 02:55:18.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qhttpnetworkconnection_p.h 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -123,6 +123,7 @@
14 years ago
14 years ago
Q_SIGNALS:
void sslErrors(const QList<QSslError> &errors);
14 years ago
+ void extendedContextInitialization(ssl_ctx_st *ctx, QSslSocket *socket);
14 years ago
#endif
14 years ago
14 years ago
Q_SIGNALS:
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessbackend.cpp qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessbackend.cpp
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessbackend.cpp 2010-11-06 02:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessbackend.cpp 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -385,4 +385,13 @@
14 years ago
}
14 years ago
#endif
14 years ago
14 years ago
+void QNetworkAccessBackend::extendedContextInitialization(ssl_ctx_st* ctx, QSslSocket *socket)
14 years ago
+{
14 years ago
+#ifndef QT_NO_OPENSSL
14 years ago
+ reply->extendedContextInitialization(ctx, socket);
14 years ago
+#else
+ Q_UNUSED(ctx);
+#endif
14 years ago
+}
+
QT_END_NAMESPACE
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessbackend_p.h qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessbackend_p.h
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessbackend_p.h 2010-11-06 02:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessbackend_p.h 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -56,6 +56,10 @@
#include "qnetworkreplyimpl_p.h"
#include "QtCore/qobject.h"
14 years ago
14 years ago
+#ifndef QT_NO_OPENSSL
+struct ssl_ctx_st;
+#endif
14 years ago
+
14 years ago
QT_BEGIN_NAMESPACE
14 years ago
14 years ago
class QAuthenticator;
14 years ago
@@ -193,6 +197,7 @@
14 years ago
void redirectionRequested(const QUrl &destination);
void sslErrors(const QList<QSslError> &errors);
void emitReplyUploadProgress(qint64 bytesSent, qint64 bytesTotal);
14 years ago
+ void extendedContextInitialization(ssl_ctx_st *ctx, QSslSocket *socket);
14 years ago
private:
friend class QNetworkAccessManager;
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccesshttpbackend.cpp qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccesshttpbackend.cpp
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccesshttpbackend.cpp 2010-11-06 02:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccesshttpbackend.cpp 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -353,6 +353,8 @@
14 years ago
#ifndef QT_NO_OPENSSL
connect(http, SIGNAL(sslErrors(QList<QSslError>)),
SLOT(sslErrors(QList<QSslError>)));
14 years ago
+ connect(http, SIGNAL(extendedContextInitialization(ssl_ctx_st*, QSslSocket*)),
+ SLOT(extendedContextInitialization(ssl_ctx_st*, QSslSocket*)));
14 years ago
#endif
}
14 years ago
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessmanager.cpp qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessmanager.cpp
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessmanager.cpp 2010-11-06 02:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessmanager.cpp 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -1066,6 +1066,16 @@
14 years ago
#endif
14 years ago
}
14 years ago
+void QNetworkAccessManagerPrivate::_q_extendedContextInitialization(ssl_ctx_st *ctx, QSslSocket *socket)
14 years ago
+{
+#ifndef QT_NO_OPENSSL
+ Q_Q(QNetworkAccessManager);
14 years ago
+ emit q->extendedContextInitialization(ctx, socket);
14 years ago
+#else
+ Q_UNUSED(ctx);
+#endif
+}
14 years ago
+
14 years ago
QNetworkReply *QNetworkAccessManagerPrivate::postProcess(QNetworkReply *reply)
{
Q_Q(QNetworkAccessManager);
14 years ago
@@ -1075,6 +1085,7 @@
14 years ago
/* In case we're compiled without SSL support, we don't have this signal and we need to
* avoid getting a connection error. */
q->connect(reply, SIGNAL(sslErrors(QList<QSslError>)), SLOT(_q_replySslErrors(QList<QSslError>)));
14 years ago
+ q->connect(reply, SIGNAL(extendedContextInitialization(ssl_ctx_st*, QSslSocket*)), SLOT(_q_extendedContextInitialization(ssl_ctx_st*, QSslSocket*)));
14 years ago
#endif
14 years ago
14 years ago
return reply;
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessmanager.h qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessmanager.h
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessmanager.h 2010-11-06 02:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessmanager.h 2011-01-18 08:35:08.334841003 +0100
14 years ago
@@ -46,6 +46,10 @@
QT_BEGIN_HEADER
+#ifndef QT_NO_OPENSSL
+struct ssl_ctx_st;
14 years ago
+#endif
+
14 years ago
QT_BEGIN_NAMESPACE
QT_MODULE(Network)
14 years ago
@@ -62,6 +66,7 @@
class QNetworkProxy;
class QNetworkProxyFactory;
class QSslError;
+class QSslSocket;
14 years ago
#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER)
class QNetworkConfiguration;
#endif
@@ -140,6 +145,7 @@
14 years ago
void finished(QNetworkReply *reply);
#ifndef QT_NO_OPENSSL
void sslErrors(QNetworkReply *reply, const QList<QSslError> &errors);
14 years ago
+ void extendedContextInitialization(ssl_ctx_st *ctx, QSslSocket *socket);
14 years ago
#endif
14 years ago
#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER)
@@ -159,6 +165,7 @@
14 years ago
Q_DECLARE_PRIVATE(QNetworkAccessManager)
Q_PRIVATE_SLOT(d_func(), void _q_replyFinished())
Q_PRIVATE_SLOT(d_func(), void _q_replySslErrors(QList<QSslError>))
14 years ago
+ Q_PRIVATE_SLOT(d_func(), void _q_extendedContextInitialization(ssl_ctx_st*, QSslSocket*))
14 years ago
#if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER)
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionClosed())
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionNewConfigurationActivated())
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessmanager_p.h qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessmanager_p.h
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkaccessmanager_p.h 2010-11-06 02:55:18.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkaccessmanager_p.h 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -60,6 +60,10 @@
14 years ago
#include "QtNetwork/qnetworkproxy.h"
14 years ago
#include "QtNetwork/qnetworksession.h"
14 years ago
+#ifndef QT_NO_OPENSSL
+struct ssl_ctx_st;
14 years ago
+#endif
+
14 years ago
QT_BEGIN_NAMESPACE
class QAuthenticator;
14 years ago
@@ -87,6 +91,7 @@
14 years ago
void _q_replyFinished();
void _q_replySslErrors(const QList<QSslError> &errors);
14 years ago
+ void _q_extendedContextInitialization(ssl_ctx_st *ctx, QSslSocket *socket);
14 years ago
QNetworkReply *postProcess(QNetworkReply *reply);
void createCookieJar() const;
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkreply.h qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkreply.h
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkreply.h 2010-11-06 02:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkreply.h 2011-01-18 08:34:28.234841008 +0100
14 years ago
@@ -51,6 +51,10 @@
QT_BEGIN_HEADER
+#ifndef QT_NO_OPENSSL
+struct ssl_ctx_st;
+#endif
14 years ago
+
14 years ago
QT_BEGIN_NAMESPACE
QT_MODULE(Network)
14 years ago
@@ -60,6 +64,7 @@
class QAuthenticator;
class QSslConfiguration;
class QSslError;
+class QSslSocket;
class QNetworkReplyPrivate;
class Q_NETWORK_EXPORT QNetworkReply: public QIODevice
@@ -150,6 +155,7 @@
14 years ago
void error(QNetworkReply::NetworkError);
#ifndef QT_NO_OPENSSL
void sslErrors(const QList<QSslError> &errors);
14 years ago
+ void extendedContextInitialization(ssl_ctx_st *ctx, QSslSocket *socket);
14 years ago
#endif
14 years ago
void uploadProgress(qint64 bytesSent, qint64 bytesTotal);
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkreplyimpl.cpp qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkreplyimpl.cpp
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkreplyimpl.cpp 2010-11-06 02:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkreplyimpl.cpp 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -704,6 +704,16 @@
14 years ago
#endif
14 years ago
}
14 years ago
14 years ago
+void QNetworkReplyImplPrivate::extendedContextInitialization(ssl_ctx_st* ctx, QSslSocket *socket)
14 years ago
+{
+#ifndef QT_NO_OPENSSL
+ Q_Q(QNetworkReplyImpl);
14 years ago
+ emit q->extendedContextInitialization(ctx, socket);
14 years ago
+#else
+ Q_UNUSED(ctx);
14 years ago
+#endif
14 years ago
+}
14 years ago
+
14 years ago
bool QNetworkReplyImplPrivate::isFinished() const
{
return (state == Finished || state == Aborted);
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkreplyimpl_p.h qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkreplyimpl_p.h
--- qt-everywhere-opensource-src-4.7.1/src/network/access/qnetworkreplyimpl_p.h 2010-11-06 02:55:17.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/access/qnetworkreplyimpl_p.h 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -63,6 +63,10 @@
#include "private/qringbuffer_p.h"
#include "private/qbytedata_p.h"
+#ifndef QT_NO_OPENSSL
+struct ssl_ctx_st;
+#endif
14 years ago
+
14 years ago
QT_BEGIN_NAMESPACE
14 years ago
14 years ago
class QAbstractNetworkCache;
14 years ago
@@ -168,6 +172,7 @@
14 years ago
void metaDataChanged();
void redirectionRequested(const QUrl &target);
void sslErrors(const QList<QSslError> &errors);
14 years ago
+ void extendedContextInitialization(ssl_ctx_st *ctx, QSslSocket *socket);
14 years ago
14 years ago
bool isFinished() const;
14 years ago
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/ssl/qsslsocket.h qt-everywhere-opensource-src-4.7.1.patched/src/network/ssl/qsslsocket.h
--- qt-everywhere-opensource-src-4.7.1/src/network/ssl/qsslsocket.h 2010-11-06 02:55:18.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/ssl/qsslsocket.h 2011-01-18 07:55:13.614841004 +0100
14 years ago
@@ -52,6 +52,10 @@
14 years ago
14 years ago
QT_BEGIN_HEADER
14 years ago
14 years ago
+#ifndef QT_NO_OPENSSL
+struct ssl_ctx_st;
+#endif
+
14 years ago
QT_BEGIN_NAMESPACE
14 years ago
QT_MODULE(Network)
@@ -186,6 +190,7 @@
void sslErrors(const QList<QSslError> &errors);
void modeChanged(QSslSocket::SslMode newMode);
void encryptedBytesWritten(qint64 totalBytes);
+ void extendedContextInitialization(ssl_ctx_st* ctx);
14 years ago
14 years ago
protected Q_SLOTS:
void connectToHostImplementation(const QString &hostName, quint16 port,
diff -ru qt-everywhere-opensource-src-4.7.1/src/network/ssl/qsslsocket_openssl.cpp qt-everywhere-opensource-src-4.7.1.patched/src/network/ssl/qsslsocket_openssl.cpp
--- qt-everywhere-opensource-src-4.7.1/src/network/ssl/qsslsocket_openssl.cpp 2010-11-06 02:55:18.000000000 +0100
+++ qt-everywhere-opensource-src-4.7.1.patched/src/network/ssl/qsslsocket_openssl.cpp 2011-01-18 07:56:51.924841003 +0100
14 years ago
@@ -371,6 +371,8 @@
14 years ago
if (configuration.peerVerifyDepth != 0)
q_SSL_CTX_set_verify_depth(ctx, configuration.peerVerifyDepth);
14 years ago
14 years ago
+ emit q->extendedContextInitialization(ctx);
14 years ago
+
14 years ago
// Create and initialize SSL session
if (!(ssl = q_SSL_new(ctx))) {
14 years ago
// ### Bad error code