to test, ignore all ssl errors; refs #43

master
Marc Wäckerlin 14 years ago
parent bf58795682
commit a3ba3e7185
  1. 5
      swisssurfer/src/browser.hxx
  2. 3
      swisssurfer/src/downloadmanager.hxx
  3. 4
      swisssurfer/src/smartcardauth.hxx
  4. 38
      swisssurfer/src/swisssurfer_de.ts
  5. 38
      swisssurfer/src/swisssurfer_en.ts
  6. 38
      swisssurfer/src/swisssurfer_fr.ts
  7. 38
      swisssurfer/src/swisssurfer_it.ts

@ -420,7 +420,10 @@ class Browser: public QMainWindow, protected Ui::Browser {
void load(QUrl page, QWebView* view=0) {
LOG<<page.toString();
statusBar()->showMessage(tr("Checking: %1").arg(page.toString()));
if (page.scheme()=="https") _scAuth.login();
if (page.scheme()=="https") {
LOG<<"Need to login";
_scAuth.login();
}
if (!check(page)) {
LOG<<"########## BLACK LISTED IGNORED ##########";
statusBar()->showMessage(tr("Forbidden: %1").arg(page.toString()));

@ -163,9 +163,10 @@ class DownloadManager: public QObject {
}
void sslErrors(const QList<QSslError> & errors) {
LOG;
qobject_cast<QNetworkReply*>(sender())->ignoreSslErrors(errors);
for (QList<QSslError>::const_iterator err(errors.begin());
err!=errors.end(); ++err) {
LOG<<"SSL-Error: "<<err->errorString();
LOG<<"SSL-Error: "<<(int)err->error()<<": "<<err->errorString();
LOG<<"Certificate Issuer: "
<<"O="<<err->certificate().issuerInfo(QSslCertificate::Organization)
<<"CN="<<err->certificate().issuerInfo(QSslCertificate::CommonName)

@ -123,14 +123,14 @@ class SmartCardAuth: public QObject {
for (std::list<std::string>::iterator cert(_cacerts.begin());
cert!=_cacerts.end(); ++cert) {
SSL_CTX_add_extra_chain_cert(ctx, openssl::X509(*cert).lowLevelCopy());
expectedSslErrors.push_back(QSslError(QSslError::SelfSignedCertificate,
expectedSslErrors.push_back(QSslError(QSslError::SelfSignedCertificateInChain,
QSslCertificate::fromData
(QByteArray(cert->data(),
cert->size()),
QSsl::Der).at(0)));
//qDebug()<<"Added:\n"<<QSslCertificate(QByteArray(cert->data(), cert->size()), QSsl::Der).toPem();
}
socket->ignoreSslErrors(expectedSslErrors);
//socket->ignoreSslErrors(expectedSslErrors);
SSL_CTX_set_client_cert_cb(ctx, &SmartCardAuth::clientCert);
}

@ -232,82 +232,82 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="435"/>
<location filename="browser.hxx" line="438"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="450"/>
<location filename="browser.hxx" line="453"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="437"/>
<location filename="browser.hxx" line="440"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="501"/>
<location filename="browser.hxx" line="504"/>
<source>Print Document</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="522"/>
<location filename="browser.hxx" line="525"/>
<source>%1 - %2</source>
<oldsource>Back to %1 - %2</oldsource>
<comment>statusbar actionBack_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="660"/>
<location filename="browser.hxx" line="663"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="673"/>
<location filename="browser.hxx" line="676"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="673"/>
<location filename="browser.hxx" line="676"/>
<source>page load error.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="926"/>
<location filename="browser.hxx" line="929"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="426"/>
<location filename="browser.hxx" line="429"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="427"/>
<location filename="browser.hxx" line="430"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="428"/>
<location filename="browser.hxx" line="431"/>
<source>&lt;p&gt;Access denied due to security considerations.&lt;/p&gt;&lt;p&gt;You are not allowed to connect to %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="541"/>
<location filename="browser.hxx" line="544"/>
<source>%1 - %2</source>
<comment>statusbar actionForward_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="605"/>
<location filename="browser.hxx" line="608"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="606"/>
<location filename="browser.hxx" line="609"/>
<source>SwissSurfer %1 (%2)
%3
@ -321,22 +321,22 @@ Compiled: qt-%5</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="655"/>
<location filename="browser.hxx" line="658"/>
<source>%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1036"/>
<location filename="browser.hxx" line="1039"/>
<source>Save File As ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1091"/>
<location filename="browser.hxx" line="1094"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1103"/>
<location filename="browser.hxx" line="1106"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>

@ -232,82 +232,82 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="435"/>
<location filename="browser.hxx" line="438"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="450"/>
<location filename="browser.hxx" line="453"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="437"/>
<location filename="browser.hxx" line="440"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="501"/>
<location filename="browser.hxx" line="504"/>
<source>Print Document</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="522"/>
<location filename="browser.hxx" line="525"/>
<source>%1 - %2</source>
<oldsource>Back to %1 - %2</oldsource>
<comment>statusbar actionBack_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="660"/>
<location filename="browser.hxx" line="663"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="673"/>
<location filename="browser.hxx" line="676"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="673"/>
<location filename="browser.hxx" line="676"/>
<source>page load error.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="926"/>
<location filename="browser.hxx" line="929"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="426"/>
<location filename="browser.hxx" line="429"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="427"/>
<location filename="browser.hxx" line="430"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="428"/>
<location filename="browser.hxx" line="431"/>
<source>&lt;p&gt;Access denied due to security considerations.&lt;/p&gt;&lt;p&gt;You are not allowed to connect to %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="541"/>
<location filename="browser.hxx" line="544"/>
<source>%1 - %2</source>
<comment>statusbar actionForward_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="605"/>
<location filename="browser.hxx" line="608"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="606"/>
<location filename="browser.hxx" line="609"/>
<source>SwissSurfer %1 (%2)
%3
@ -321,22 +321,22 @@ Compiled: qt-%5</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="655"/>
<location filename="browser.hxx" line="658"/>
<source>%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1036"/>
<location filename="browser.hxx" line="1039"/>
<source>Save File As ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1091"/>
<location filename="browser.hxx" line="1094"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1103"/>
<location filename="browser.hxx" line="1106"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>

@ -232,82 +232,82 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="435"/>
<location filename="browser.hxx" line="438"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="450"/>
<location filename="browser.hxx" line="453"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="437"/>
<location filename="browser.hxx" line="440"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="501"/>
<location filename="browser.hxx" line="504"/>
<source>Print Document</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="522"/>
<location filename="browser.hxx" line="525"/>
<source>%1 - %2</source>
<oldsource>Back to %1 - %2</oldsource>
<comment>statusbar actionBack_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="660"/>
<location filename="browser.hxx" line="663"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="673"/>
<location filename="browser.hxx" line="676"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="673"/>
<location filename="browser.hxx" line="676"/>
<source>page load error.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="926"/>
<location filename="browser.hxx" line="929"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="426"/>
<location filename="browser.hxx" line="429"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="427"/>
<location filename="browser.hxx" line="430"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="428"/>
<location filename="browser.hxx" line="431"/>
<source>&lt;p&gt;Access denied due to security considerations.&lt;/p&gt;&lt;p&gt;You are not allowed to connect to %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="541"/>
<location filename="browser.hxx" line="544"/>
<source>%1 - %2</source>
<comment>statusbar actionForward_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="605"/>
<location filename="browser.hxx" line="608"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="606"/>
<location filename="browser.hxx" line="609"/>
<source>SwissSurfer %1 (%2)
%3
@ -321,22 +321,22 @@ Compiled: qt-%5</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="655"/>
<location filename="browser.hxx" line="658"/>
<source>%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1036"/>
<location filename="browser.hxx" line="1039"/>
<source>Save File As ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1091"/>
<location filename="browser.hxx" line="1094"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1103"/>
<location filename="browser.hxx" line="1106"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>

@ -232,82 +232,82 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="435"/>
<location filename="browser.hxx" line="438"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="450"/>
<location filename="browser.hxx" line="453"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="437"/>
<location filename="browser.hxx" line="440"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="501"/>
<location filename="browser.hxx" line="504"/>
<source>Print Document</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="522"/>
<location filename="browser.hxx" line="525"/>
<source>%1 - %2</source>
<oldsource>Back to %1 - %2</oldsource>
<comment>statusbar actionBack_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="660"/>
<location filename="browser.hxx" line="663"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="673"/>
<location filename="browser.hxx" line="676"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="673"/>
<location filename="browser.hxx" line="676"/>
<source>page load error.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="926"/>
<location filename="browser.hxx" line="929"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="426"/>
<location filename="browser.hxx" line="429"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="427"/>
<location filename="browser.hxx" line="430"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="428"/>
<location filename="browser.hxx" line="431"/>
<source>&lt;p&gt;Access denied due to security considerations.&lt;/p&gt;&lt;p&gt;You are not allowed to connect to %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="541"/>
<location filename="browser.hxx" line="544"/>
<source>%1 - %2</source>
<comment>statusbar actionForward_hovered %1=url %2=title</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="605"/>
<location filename="browser.hxx" line="608"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="606"/>
<location filename="browser.hxx" line="609"/>
<source>SwissSurfer %1 (%2)
%3
@ -321,22 +321,22 @@ Compiled: qt-%5</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="655"/>
<location filename="browser.hxx" line="658"/>
<source>%1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1036"/>
<location filename="browser.hxx" line="1039"/>
<source>Save File As ...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1091"/>
<location filename="browser.hxx" line="1094"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="1103"/>
<location filename="browser.hxx" line="1106"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>

Loading…
Cancel
Save