diff --git a/swisssurfer/src/browser.hxx b/swisssurfer/src/browser.hxx index 5c1b47d..8424921 100644 --- a/swisssurfer/src/browser.hxx +++ b/swisssurfer/src/browser.hxx @@ -57,12 +57,11 @@ class Browser: public QMainWindow, protected Ui::Browser { Settings::MimeTypes mimeTypes = Settings::MimeTypes(), bool kiosk = false, bool login = true): _url(0), _clearUrl(0), _addBookmark(0), _find(0), - _kiosk(kiosk), + _kiosk(kiosk), _settings(mimeTypes, this, settings, !kiosk), _errorLog(this) { LOG< - (new SmartCardAuth(actlib, this, login)); + _networkManager.scAuth(new SmartCardAuth(actlib, this, login)); } catch (const std::exception& x) { LOG<<"No SmartCard Support:"<showMessage(tr("Checking: %1").arg(page.toString())); - if (page.scheme()=="https") { - LOG<<"Need to login"; - if (!QSslSocket::supportsSsl()) - QMessageBox::critical(this, tr("SSL Not Supported"), - tr("SSL is not supported on your system")); - if (_scAuth.get()) _scAuth->login(false); - } if (!check(page)) { LOG<<"########## BLACK LISTED IGNORED ##########"; statusBar()->showMessage(tr("Forbidden: %1").arg(page.toString())); @@ -1224,7 +1219,6 @@ class Browser: public QMainWindow, protected Ui::Browser { DownloadProcesses _downloadProcesses; Settings _settings; ErrorLog _errorLog; - std::auto_ptr _scAuth; }; #endif diff --git a/swisssurfer/src/makefile.am b/swisssurfer/src/makefile.am index e307a23..b00510d 100644 --- a/swisssurfer/src/makefile.am +++ b/swisssurfer/src/makefile.am @@ -63,8 +63,8 @@ ${QMAKE_TARGET}: ${QMAKE_MAKEFILE} ${ALL_SRC} $(LANGS:%=@PACKAGENAME@_%.qm) clean-local: -rm -r ${QMAKE_TARGET}.app -maintainer-clean-local: - -rm -rf ${QMAKE_TARGET}.app +maintainer-clean-local: + -rm -rf ${QMAKE_TARGET}.app install-exec-local: ( test -f @PACKAGENAME@ && cp @PACKAGENAME@ ${bindir}/ ) \ @@ -72,7 +72,7 @@ install-exec-local: || ( test -d @PACKAGENAME@.app && cp -r @PACKAGENAME@.app ${bindir}/ ) uninstall-local: - -rm -rf ${bindir}/@PACKAGENAME@{,.exe,.app} + -rm -rf ${bindir}/@PACKAGENAME@{,.exe,.app} CLEANFILES = ${TARGETS} ${TARGETS:%=%.exe} $(LANGS:%=@PACKAGENAME@_%.qm) \ *.o *.obj qrc_*.cpp ui_*.h moc_*.cpp \ diff --git a/swisssurfer/src/sslclientnetworkmanager.hxx b/swisssurfer/src/sslclientnetworkmanager.hxx index 1bb348f..a644fbe 100644 --- a/swisssurfer/src/sslclientnetworkmanager.hxx +++ b/swisssurfer/src/sslclientnetworkmanager.hxx @@ -6,6 +6,7 @@ // 45678901234567890123456789012345678901234567890123456789012345678901234567890 #include #include +#include #include #ifndef LOG @@ -25,6 +26,10 @@ class SslClientAuthNetworkAccessManager: public QNetworkAccessManager { LOG; } + void scAuth(SmartCardAuth* auth) { + _scAuth = std::auto_ptr(auth); + } + Q_SIGNALS: void created(QNetworkReply*); @@ -35,6 +40,10 @@ class SslClientAuthNetworkAccessManager: public QNetworkAccessManager { const QNetworkRequest& req, QIODevice* outgoingData = 0 ) { LOG<login(false); + } QNetworkReply* rep (QNetworkAccessManager::createRequest(op, req, outgoingData)); created(rep); @@ -42,4 +51,8 @@ class SslClientAuthNetworkAccessManager: public QNetworkAccessManager { return rep; } + private: + + std::auto_ptr _scAuth; + }; diff --git a/swisssurfer/src/swisssurfer_de.ts b/swisssurfer/src/swisssurfer_de.ts index cd3bbee..7f21db0 100644 --- a/swisssurfer/src/swisssurfer_de.ts +++ b/swisssurfer/src/swisssurfer_de.ts @@ -236,98 +236,98 @@ - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + page load error. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + SSL Not Supported - + SSL is not supported on your system - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + About - + SwissSurfer %1 (%2) %3 @@ -341,22 +341,22 @@ Compiled: qt-%5 - + %1 - + Save File As ... - + authentication required - + ssl error @@ -610,7 +610,7 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -658,27 +658,27 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help diff --git a/swisssurfer/src/swisssurfer_en.ts b/swisssurfer/src/swisssurfer_en.ts index 708e9cc..14f996d 100644 --- a/swisssurfer/src/swisssurfer_en.ts +++ b/swisssurfer/src/swisssurfer_en.ts @@ -234,74 +234,74 @@ - + Checking: %1 - + SSL Not Supported - + SSL is not supported on your system - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + Reading: %1 - + Illegal URL: %1 - + Zoom: %1% - + Print Document - + %1 - %2 statusbar actionBack_hovered %1=url %2=title - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + About - + SwissSurfer %1 (%2) %3 @@ -310,43 +310,43 @@ Compiled: qt-%5 - + %1 - + Info: %1 - + done. - + page load error. - + %1 statusbar for hovered link %1=url - + Save File As ... - + authentication required - + ssl error @@ -595,7 +595,7 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -621,27 +621,27 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help diff --git a/swisssurfer/src/swisssurfer_fr.ts b/swisssurfer/src/swisssurfer_fr.ts index cd3bbee..7f21db0 100644 --- a/swisssurfer/src/swisssurfer_fr.ts +++ b/swisssurfer/src/swisssurfer_fr.ts @@ -236,98 +236,98 @@ - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + page load error. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + SSL Not Supported - + SSL is not supported on your system - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + About - + SwissSurfer %1 (%2) %3 @@ -341,22 +341,22 @@ Compiled: qt-%5 - + %1 - + Save File As ... - + authentication required - + ssl error @@ -610,7 +610,7 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -658,27 +658,27 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help diff --git a/swisssurfer/src/swisssurfer_it.ts b/swisssurfer/src/swisssurfer_it.ts index cd3bbee..7f21db0 100644 --- a/swisssurfer/src/swisssurfer_it.ts +++ b/swisssurfer/src/swisssurfer_it.ts @@ -236,98 +236,98 @@ - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + page load error. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + SSL Not Supported - + SSL is not supported on your system - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + About - + SwissSurfer %1 (%2) %3 @@ -341,22 +341,22 @@ Compiled: qt-%5 - + %1 - + Save File As ... - + authentication required - + ssl error @@ -610,7 +610,7 @@ p, li { white-space: pre-wrap; } QObject - + Usage: %1 [OPTIONS...] [<url> ...] Options: -h, --help show this help text @@ -658,27 +658,27 @@ Environment: - + Cannot read PEM certificate from file: %1 - + Read PEM certificates from file: %1 - + Cannot read PEM RSA key from file: %1 - + Read private key from file: %1 - + Too few arguments. Try: %1 --help