diff --git a/swisssurfer/src/browser.hxx b/swisssurfer/src/browser.hxx index 8424921..a19b694 100644 --- a/swisssurfer/src/browser.hxx +++ b/swisssurfer/src/browser.hxx @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -58,7 +59,8 @@ class Browser: public QMainWindow, protected Ui::Browser { bool kiosk = false, bool login = true): _url(0), _clearUrl(0), _addBookmark(0), _find(0), _kiosk(kiosk), - _settings(mimeTypes, this, settings, !kiosk), _errorLog(this) { + _settings(mimeTypes, this, settings, !kiosk), + _errorLog(this), _logincertificate(this) { LOG< Info + @@ -309,6 +310,11 @@ show error logs + + + User Login Certificate + + diff --git a/swisssurfer/src/certificate.hxx b/swisssurfer/src/certificate.hxx new file mode 100644 index 0000000..2128d75 --- /dev/null +++ b/swisssurfer/src/certificate.hxx @@ -0,0 +1,104 @@ +/*! @file + + @id $Id$ +*/ +// 1 2 3 4 5 6 7 8 +// 45678901234567890123456789012345678901234567890123456789012345678901234567890 + +#ifndef CERTIFICATE_HXX +#define CERTIFICATE_HXX + +#include +#include +#include +#include +#include + +class Certificate: public QTreeWidget, protected Ui::Certificate { + public: + Certificate(QWidget* p): QTreeWidget(p) { + setupUi(this); + } + Certificate& certificate(const QSslCertificate& cert) { + _cert->clear(); + if (!cert.isValid()) return *this; + _cert->addTopLevelItem + ((new QTreeWidgetItem + (QStringList()<addTopLevelItem + ((new QTreeWidgetItem + (QStringList()<addTopLevelItem + ((new QTreeWidgetItem + (QStringList()<addTopLevelItem + ((new QTreeWidgetItem + (QStringList()<addTopLevelItem + ((it = new QTreeWidgetItem(QStringList()<=QSslCertificate::Organization; + si=(QSslCertificate::SubjectInfo)((int)si-1)) + if (!cert.subjectInfo(si).isEmpty()) + it->addChild + ((new QTreeWidgetItem + (QStringList()<addChild + ((it2 = new QTreeWidgetItem + (QStringList()< + asns(cert.alternateSubjectNames()); + for (QMultiMap::iterator + asn(asns.begin()); asn!=asns.end(); ++asn) + it2->addChild + ((new QTreeWidgetItem + (QStringList()<addTopLevelItem + ((it = new QTreeWidgetItem(QStringList()<=QSslCertificate::Organization; + si=(QSslCertificate::SubjectInfo)((int)si-1)) + if (!cert.issuerInfo(si).isEmpty()) + it->addChild + ((new QTreeWidgetItem + (QStringList()<expandAll(); + _cert->resizeColumnToContents(0); + _cert->resizeColumnToContents(1); + return *this; + } + QString alternateName(QSsl::AlternateNameEntryType an) { + switch (an) { + case QSsl::EmailEntry: return tr("E-Mail"); + case QSsl::DnsEntry: return tr("URL"); + } + return tr("error", "unknown certificate subject alternate name"); + } + QString subjectInfo(QSslCertificate::SubjectInfo si) { + switch (si) { + case QSslCertificate::Organization: + return tr("Organization"); + case QSslCertificate::CommonName: + return tr("Common Name"); + case QSslCertificate::LocalityName: + return tr("Locality"); + case QSslCertificate::OrganizationalUnitName: + return tr("Organizational Unit"); + case QSslCertificate::CountryName: + return tr("Country"); + case QSslCertificate::StateOrProvinceName: + return tr("State or Province"); + } + return tr("error", "unknown certificate subject info"); + } +}; + +#endif diff --git a/swisssurfer/src/certificate.ui b/swisssurfer/src/certificate.ui new file mode 100644 index 0000000..648500a --- /dev/null +++ b/swisssurfer/src/certificate.ui @@ -0,0 +1,56 @@ + + + Certificate + + + + 0 + 0 + 400 + 320 + + + + Form + + + + + + QAbstractItemView::NoEditTriggers + + + true + + + true + + + false + + + true + + + true + + + false + + + + Attribute + + + + + Value + + + + + + + + + diff --git a/swisssurfer/src/logincertificate.ui b/swisssurfer/src/logincertificate.ui new file mode 100644 index 0000000..83e4236 --- /dev/null +++ b/swisssurfer/src/logincertificate.ui @@ -0,0 +1,83 @@ + + + LoginCertificate + + + + 0 + 0 + 726 + 471 + + + + User Login Certificate + + + + + + Qt::Horizontal + + + QDialogButtonBox::Close + + + true + + + + + + + + 1 + + + + + + + + + Certificate + QTreeWidget +
certificate.hxx
+
+
+ + + + buttonBox + accepted() + LoginCertificate + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + LoginCertificate + reject() + + + 316 + 260 + + + 286 + 274 + + + + +
diff --git a/swisssurfer/src/pinentry.hxx b/swisssurfer/src/pinentry.hxx index 8d2a2d5..c3257f2 100644 --- a/swisssurfer/src/pinentry.hxx +++ b/swisssurfer/src/pinentry.hxx @@ -20,25 +20,7 @@ class PinEntry: public QDialog, public Ui::PinEntry { public: PinEntry(const QSslCertificate& cert, QWidget *parent=0): QDialog(parent) { setupUi(this); - _commonName->setText(cert.subjectInfo(QSslCertificate::CommonName)); - _organization->setText(cert.subjectInfo(QSslCertificate::Organization)); - _email->setText(cert.alternateSubjectNames() - .find(QSsl::EmailEntry).value()); - _serial->setText(cert.serialNumber()); - _expiry->setText(cert.expiryDate().toString()); - _issuerCa->setText(cert.issuerInfo(QSslCertificate::CommonName)); - _commonName->setVisible(_commonName->text().size()); - _commonNameLabel->setVisible(_commonName->text().size()); - _organization->setVisible(_organization->text().size()); - _organizationLabel->setVisible(_organization->text().size()); - _email->setVisible(_email->text().size()); - _emailLabel->setVisible(_email->text().size()); - _serial->setVisible(_serial->text().size()); - _serialLabel->setVisible(_serial->text().size()); - _expiry->setVisible(_expiry->text().size()); - _expiryLabel->setVisible(_expiry->text().size()); - _issuerCa->setVisible(_issuerCa->text().size()); - _issuerCaLabel->setVisible(_issuerCa->text().size()); + _cert->certificate(cert); } PinEntry& retries(int num) { _pinstatus->setCurrentIndex(num==-1?1:(num==-2?2:0)); diff --git a/swisssurfer/src/pinentry.ui b/swisssurfer/src/pinentry.ui index 86df07d..badfe61 100644 --- a/swisssurfer/src/pinentry.ui +++ b/swisssurfer/src/pinentry.ui @@ -6,8 +6,8 @@ 0 0 - 309 - 381 + 722 + 595 @@ -52,187 +52,95 @@ - - - Certificate Information - - - - - - Common Name: - - - - - - - TextLabel - - - - - - - Organization: - - - - - - - TextLabel - - - - - - - E-Mail: - - - - - - - TextLabel - - - - - - - Serial - - - - - - - TextLabel - - - - - - - Expiry: - - - - - - - TextLabel - - - - - - - Issuer CA: - - - - - - - TextLabel - - - - + + + + 1 + + - - - Qt::Vertical + + + + 0 + 0 + - - - 20 - 32 - + + 1 - - - - - - QFormLayout::ExpandingFieldsGrow - - - - - 2 - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:24pt; color:#00b900;">✔</span></p></body></html> - - - - - - - - 0 - 0 - - - - there are %1 PIN attempts left - - - true - - - - - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + + + + + + + 0 + 0 + + + + there are %1 PIN attempts left + + + true + + + + + + + + + + + + 0 + 0 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu Serif'; font-size:11pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'sans-serif'; font-size:24pt; color:#ff0000;">✘</span></p></body></html> - - - - - - - - 0 - 0 - - - - certificate is bad or locked - - - true - - - - - - - - - + + + + + + + + 0 + 0 + + + + certificate is bad or locked + + + true + + + + + + + @@ -246,6 +154,13 @@ p, li { white-space: pre-wrap; } + + + Certificate + QTreeWidget +
certificate.hxx
+
+
diff --git a/swisssurfer/src/qmake.pro.in b/swisssurfer/src/qmake.pro.in index ef98506..f91c400 100644 --- a/swisssurfer/src/qmake.pro.in +++ b/swisssurfer/src/qmake.pro.in @@ -35,9 +35,11 @@ SOURCES = main.cxx webpage.cxx HEADERS = browser.hxx smartcardauth.hxx pinentry.hxx \ downloadmanager.hxx settings.hxx sslclientnetworkmanager.hxx \ - authentication.hxx webpage.hxx errorlog.hxx + authentication.hxx webpage.hxx errorlog.hxx \ + certificate.hxx logincertificate.hxx -FORMS = browser.ui settings.ui pinentry.ui authentication.ui errorlog.ui +FORMS = browser.ui settings.ui pinentry.ui authentication.ui errorlog.ui \ + certificate.ui logincertificate.ui RESOURCES = languages.qrc resources.qrc diff --git a/swisssurfer/src/swisssurfer_de.ts b/swisssurfer/src/swisssurfer_de.ts index 7f21db0..269c701 100644 --- a/swisssurfer/src/swisssurfer_de.ts +++ b/swisssurfer/src/swisssurfer_de.ts @@ -64,270 +64,275 @@ - + neu laden - + F5 - + stoppen - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + &Close - + &Proxy... - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - - + + User Login Certificate + + + + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + 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,26 +346,131 @@ Compiled: qt-%5 - + %1 - + Save File As ... - + authentication required - + ssl error + + Certificate + + + Valid Since + + + + + Valid Until + + + + + Serial Number + + + + + Version + + + + + Issuer Info + + + + + Subject Info + + + + + Alternate Subject + + + + + E-Mail + + + + + URL + + + + + error + unknown certificate subject alternate name + + + + + Organization + + + + + Common Name + + + + + Locality + + + + + Organizational Unit + + + + + Country + + + + + State or Province + + + + + error + unknown certificate subject info + + + + + Form + + + + + Attribute + + + + + Value + + + DownloadManager @@ -500,6 +610,14 @@ Compiled: qt-%5 + + LoginCertificate + + + User Login Certificate + + + PinEntry @@ -520,58 +638,13 @@ Compiled: qt-%5 - - Certificate Information - - - - - Common Name: - - - - - - - - - - TextLabel - - - - - Organization: - - - - - E-Mail: - - - - - Serial - - - - - Expiry: - - - - - Issuer CA: - - - - - + + there are %1 PIN attempts left - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -580,12 +653,12 @@ p, li { white-space: pre-wrap; } - + certificate is bad or locked - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } diff --git a/swisssurfer/src/swisssurfer_en.ts b/swisssurfer/src/swisssurfer_en.ts index 14f996d..1bce05b 100644 --- a/swisssurfer/src/swisssurfer_en.ts +++ b/swisssurfer/src/swisssurfer_en.ts @@ -63,245 +63,250 @@ - + neu laden - + F5 - + stoppen - - + + Esc - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + &Close - + &Proxy... - + Print ... - + Print Pre&view ... - + Quick &Print - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + find in page - + Ctrl+F - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - + + User Login Certificate + + + + 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,47 +315,152 @@ Compiled: qt-%5 - + %1 - + Info: %1 - + done. - + page load error. - + %1 statusbar for hovered link %1=url - + Save File As ... - + authentication required - + ssl error + + Certificate + + + Valid Since + + + + + Valid Until + + + + + Serial Number + + + + + Version + + + + + Issuer Info + + + + + Subject Info + + + + + Alternate Subject + + + + + E-Mail + + + + + URL + + + + + error + unknown certificate subject alternate name + + + + + Organization + + + + + Common Name + + + + + Locality + + + + + Organizational Unit + + + + + Country + + + + + State or Province + + + + + error + unknown certificate subject info + + + + + Form + + + + + Attribute + + + + + Value + + + DownloadManager @@ -487,6 +597,14 @@ Compiled: qt-%5 + + LoginCertificate + + + User Login Certificate + + + PinEntry @@ -505,52 +623,7 @@ Compiled: qt-%5 - - Certificate Information - - - - - Common Name: - - - - - - - - - - TextLabel - - - - - Organization: - - - - - E-Mail: - - - - - Serial - - - - - Expiry: - - - - - Issuer CA: - - - - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -559,13 +632,13 @@ p, li { white-space: pre-wrap; } - - + + there are %1 PIN attempts left - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -574,7 +647,7 @@ p, li { white-space: pre-wrap; } - + certificate is bad or locked diff --git a/swisssurfer/src/swisssurfer_fr.ts b/swisssurfer/src/swisssurfer_fr.ts index 7f21db0..269c701 100644 --- a/swisssurfer/src/swisssurfer_fr.ts +++ b/swisssurfer/src/swisssurfer_fr.ts @@ -64,270 +64,275 @@ - + neu laden - + F5 - + stoppen - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + &Close - + &Proxy... - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - - + + User Login Certificate + + + + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + 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,26 +346,131 @@ Compiled: qt-%5 - + %1 - + Save File As ... - + authentication required - + ssl error + + Certificate + + + Valid Since + + + + + Valid Until + + + + + Serial Number + + + + + Version + + + + + Issuer Info + + + + + Subject Info + + + + + Alternate Subject + + + + + E-Mail + + + + + URL + + + + + error + unknown certificate subject alternate name + + + + + Organization + + + + + Common Name + + + + + Locality + + + + + Organizational Unit + + + + + Country + + + + + State or Province + + + + + error + unknown certificate subject info + + + + + Form + + + + + Attribute + + + + + Value + + + DownloadManager @@ -500,6 +610,14 @@ Compiled: qt-%5 + + LoginCertificate + + + User Login Certificate + + + PinEntry @@ -520,58 +638,13 @@ Compiled: qt-%5 - - Certificate Information - - - - - Common Name: - - - - - - - - - - TextLabel - - - - - Organization: - - - - - E-Mail: - - - - - Serial - - - - - Expiry: - - - - - Issuer CA: - - - - - + + there are %1 PIN attempts left - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -580,12 +653,12 @@ p, li { white-space: pre-wrap; } - + certificate is bad or locked - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } diff --git a/swisssurfer/src/swisssurfer_it.ts b/swisssurfer/src/swisssurfer_it.ts index 7f21db0..269c701 100644 --- a/swisssurfer/src/swisssurfer_it.ts +++ b/swisssurfer/src/swisssurfer_it.ts @@ -64,270 +64,275 @@ - + neu laden - + F5 - + stoppen - + zurückkehren - + weitergehen - + Startseite - + Ctrl+Home - + &New Browser - + New Browser Window - + Ctrl+N - + &Close - + &Proxy... - + Ctrl+P - + Next Tab - + Shift+Right - + Previous Tab - + Shift+Left - + New Tab - + Add New Tab - + Ctrl+T - + Find - + Close Find - + &About - + &Settings ... - + &Reverse Find - + Ctrl+R - + Error Log - + show error logs - - + + User Login Certificate + + + + + Esc - + find in page - + Ctrl+F - + Print ... - + Quick &Print &Print - + Print Pre&view ... - + 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,26 +346,131 @@ Compiled: qt-%5 - + %1 - + Save File As ... - + authentication required - + ssl error + + Certificate + + + Valid Since + + + + + Valid Until + + + + + Serial Number + + + + + Version + + + + + Issuer Info + + + + + Subject Info + + + + + Alternate Subject + + + + + E-Mail + + + + + URL + + + + + error + unknown certificate subject alternate name + + + + + Organization + + + + + Common Name + + + + + Locality + + + + + Organizational Unit + + + + + Country + + + + + State or Province + + + + + error + unknown certificate subject info + + + + + Form + + + + + Attribute + + + + + Value + + + DownloadManager @@ -500,6 +610,14 @@ Compiled: qt-%5 + + LoginCertificate + + + User Login Certificate + + + PinEntry @@ -520,58 +638,13 @@ Compiled: qt-%5 - - Certificate Information - - - - - Common Name: - - - - - - - - - - TextLabel - - - - - Organization: - - - - - E-Mail: - - - - - Serial - - - - - Expiry: - - - - - Issuer CA: - - - - - + + there are %1 PIN attempts left - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -580,12 +653,12 @@ p, li { white-space: pre-wrap; } - + certificate is bad or locked - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }