it works; closes #8

master
Marc Wäckerlin 14 years ago
parent 1d0ba31114
commit cd84f2f7fe
  1. 6
      Test_Qt_Frontend/QtSslTest.pro
  2. 45
      Test_Qt_Frontend/qtssltest.cpp
  3. 25
      Test_Qt_Frontend/smartcardauth.cpp
  4. 1
      Test_Qt_Frontend/smartcardauth.h
  5. 27
      openssl-act-engine/README
  6. 2
      openssl-act-engine/configure.in
  7. 5
      openssl-act-engine/makefile.am
  8. 11
      openssl-act-engine/src/engine_sct.cpp
  9. 6
      openssl-act-engine/src/test_engine.cpp
  10. 6
      swisssurfer/README
  11. 1
      swisssurfer/configure.in
  12. 44
      swisssurfer/src/browser.hxx
  13. 5
      swisssurfer/src/main.cxx
  14. 37
      swisssurfer/src/pindialog.cxx
  15. 22
      swisssurfer/src/pindialog.hxx
  16. 9
      swisssurfer/src/qmake.pro.in
  17. 163
      swisssurfer/src/smartcardauth.cxx
  18. 30
      swisssurfer/src/smartcardauth.hxx
  19. 100
      swisssurfer/src/swisssurfer_de.ts
  20. 100
      swisssurfer/src/swisssurfer_en.ts
  21. 100
      swisssurfer/src/swisssurfer_fr.ts
  22. 100
      swisssurfer/src/swisssurfer_it.ts

@ -6,7 +6,11 @@ TARGET =
DEPENDPATH += .
INCLUDEPATH += ../openssl-act-engine ../openssl-act-engine/src . ../qt/qt-everywhere-opensource-src-4.6.3/include ../qt/qt-everywhere-opensource-src-4.6.3/include/Qt
CONFIG += debug
QMAKE_CXXFLAGS+=-pthread
QMAKE_LFLAGS+=-pthread
CONFIG += debug thread
LIBS += -lssl
# Input
SOURCES += qtssltest.cpp \

@ -6,11 +6,54 @@
#include <iostream>
#include "smartcardauth.h"
#include <openssl/engine.h>
#define CHECK(X) \
if (((!(((res=X)))))) { \
printf("ERROR: %s\n", #X); \
for (unsigned int err(0); err=ERR_get_error();) { \
fprintf(stderr,"%s\n", ERR_error_string(err, NULL)); \
} \
return -1; \
}
SmartCardAuth g_scard_auth;
int main(int argc, char *argv[])
{
/*
ENGINE* e = NULL;
enum_certs_s* certs_found = NULL;
ENGINE_load_dynamic();
e = ENGINE_by_id("dynamic");
if (!e) {
printf("ERROR: No Engine");
return -1;
}
int res(-1);
// Parameters to set for the dynamic loader
CHECK(ENGINE_ctrl_cmd_string(e, "SO_PATH", "./.libs/libengine_act.so", 0));
CHECK(ENGINE_ctrl_cmd_string(e, "ID", "act", 0));
CHECK(ENGINE_ctrl_cmd_string(e, "LIST_ADD", "1", 0));
// Now actually load the SecureToken engine.
CHECK(ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0)
|| ENGINE_ctrl_cmd_string(e, "SO_PATH", "./src/.libs/libengine_act.so", 0)
&& ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0)
|| ENGINE_ctrl_cmd_string(e, "SO_PATH", "../openssl-act-engine/src/.libs/libengine_act.so", 0)
&& ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0));
// Following control commands go to the SecureToken engine rather than the dynamic loader
CHECK(ENGINE_init(e));
return 0;
*/
SmartCardAuth::initialize();
QApplication app(argc, argv);
@ -20,7 +63,7 @@ int main(int argc, char *argv[])
// Works even without specifying the root certificate, we just need to add the intermediates,
// and that's done in SmartCardAuth.cpp
#if 0
QFile caCertsFile("D:\\QtSmartCardAuth_TMI\\QtSslTest\\swsign_root.pem");
QFile caCertsFile("swsign_root.pem");
caCertsFile.open(QIODevice::ReadOnly);
QList<QSslCertificate> chain( QSslCertificate::fromDevice(&caCertsFile) );

@ -6,6 +6,8 @@
#include <string>
#include <QtCore/QDebug>
ENGINE* SmartCardAuth::e=NULL;
enum_certs_s* SmartCardAuth::certs_found=NULL;
QWidget* SmartCardAuth::parent=0;
@ -13,16 +15,20 @@ bool SmartCardAuth::pin_configured=false;
bool SmartCardAuth::pin_rejected=false;
void SmartCardAuth::initialize() {
QSslSocketPrivate::ensureInitialized();
//QSslSocketPrivate::ensureInitialized();
q_ENGINE_load_dynamic();
e = q_ENGINE_by_id("dynamic");
ENGINE_load_dynamic();
e = ENGINE_by_id("dynamic");
Q_ASSERT(e);
//! @todo add library-name
int r=q_ENGINE_ctrl_cmd_string(e, "SO_PATH", "...library-name...", 0);
r=q_ENGINE_ctrl_cmd_string(e, "ID", "act", 0);
r=q_ENGINE_ctrl_cmd_string(e, "LIST_ADD", "1", 0);
r=q_ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0);
int r=ENGINE_ctrl_cmd_string(e, "SO_PATH", "../openssl-act-engine/src/.libs/libengine_act.so", 0);
Q_ASSERT(r);
r=ENGINE_ctrl_cmd_string(e, "ID", "act", 0);
Q_ASSERT(r);
r=ENGINE_ctrl_cmd_string(e, "LIST_ADD", "1", 0);
Q_ASSERT(r);
r=ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0);
Q_ASSERT(r);
if(!r)
{
@ -34,7 +40,7 @@ void SmartCardAuth::initialize() {
}
}
r=q_ENGINE_init(e);
r=ENGINE_init(e);
}
@ -59,6 +65,7 @@ int SmartCardAuth::client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
// Name has the format "slot-x-name-SwissSign_digSig" for the certificate/key we're looking for
std::string name(certs_found->certificate[i].name);
qDebug()<<"Certificate:"<<name.c_str();
std::string compare("-name-SwissSign_digSig");
// Compare the rightmost part of the retrieved name to locate the certificate/keypair

@ -2,6 +2,7 @@
#define SMARTCARDAUTH_H
#include <Qt/private/qopensslhook_p.h>
class QWidget;
struct enum_certs_s;

@ -2,3 +2,30 @@ OpenSSL-Engine auf Basis der actlibrary zur Benutzung von
Smartcard-basierten Schlüsseln von OpenSSL aus.
Erstellt libengine_act.so
Beim Kompilieren braucht es den Pfad zu einer passenden libact.a, z.B.:
./bootstrap.sh && \
LDFLAGS="-L/home/marc/svn/swisssurfer/actlibrary/OpenSUSE-11-x86_64/Release" \
./configure && \
make
src/test_engine
Bei Erfolg kommt keien Fehlermeldung:
------------------------------------------------------------------------------
> src/test_engine
Found 4 certificates.
Certificate 0:
Name: /C=CH/O=SwissSign AG/CN=SwissSign Platinum CA - G2
No key.
Certificate 1:
Name: /CN=Marc Waeckerlin/emailAddress=marc@waeckerlin.org
Key access ID: slot-0-id-7e807c700d5880aa3d7e6db92ae9fcc4bf9afd2d
Certificate 2:
Name: /CN=Marc Waeckerlin/emailAddress=marc@waeckerlin.org
Key access ID: slot-0-id-46afda4155d8c4b7a038340a479584ab5385549e
Certificate 3:
Name: /C=CH/O=SwissSign AG/CN=Swiss Post Platinum CA 2008 - G2
No key.
Token PIN:
Signature-Len: 256
------------------------------------------------------------------------------

@ -44,7 +44,7 @@ LIB_VERSION="${LIB_MAJOR}:${LIB_MINOR}:${LIB_LEAST}"
AC_SUBST(LIB_VERSION)
# Get rid of that stupid -O2 -g options!
CXXFLAGS="${CXXFLAGS:-}"
CXXFLAGS="${CXXFLAGS:-} -pthread"
# languages
AC_LANG(C++)

@ -1 +1,4 @@
SUBDIRS=src
SUBDIRS=src doc
MAINTAINERCLEANFILES = configure depcomp config.guess ltmain.sh \
config.sub makefile.in missing aclocal.m4 install-sh

@ -351,13 +351,15 @@ int SecureTokenEngine::rsa_sign(int type, const unsigned char *msg, unsigned int
int SecureTokenEngine::rsa_verify(int type, const unsigned char *msg, unsigned int msglen, unsigned char *signature, unsigned int siglen, const CardKey* ck)
{
bool ssl = (type == NID_md5_sha1);
if(ck == NULL)
{
ACT_TRACE("SecureTokenEngine::rsa_verify: No CardKey given\n");
return 0;
}
act::IToken* token = ck->getKey()->GetToken();
act::ITokenKey* key = ck->getKey();
act::IToken* token = key->GetToken();
SecOpGuard guard(token);
act::Synchronize lock(*token);
@ -365,9 +367,12 @@ int SecureTokenEngine::rsa_verify(int type, const unsigned char *msg, unsigned i
act::Blob _signature(signature, signature+siglen);
bool sig_ok = false;
if(ssl)
key->SetParam(act::HASH, "DummyHash");
try
{
act::Algorithm alg(ck->getKey(), act::VERIFY, _signature);
act::Algorithm alg(key, act::VERIFY, _signature);
alg << _plaintext << act::final;
sig_ok = alg.GetStatus() == act::SIGNATURE_OK;
}

@ -31,12 +31,14 @@ int main(int argc, char* argv[])
int res(-1);
// Parameters to set for the dynamic loader
CHECK(ENGINE_ctrl_cmd_string(e, "SO_PATH", "./libengine_act.so", 0));
CHECK(ENGINE_ctrl_cmd_string(e, "SO_PATH", "./.libs/libengine_act.so", 0));
CHECK(ENGINE_ctrl_cmd_string(e, "ID", "act", 0));
CHECK(ENGINE_ctrl_cmd_string(e, "LIST_ADD", "1", 0));
// Now actually load the SecureToken engine.
CHECK(ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0));
CHECK(ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0)
|| ENGINE_ctrl_cmd_string(e, "SO_PATH", "./src/.libs/libengine_act.so", 0)
&& ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0));
// Following control commands go to the SecureToken engine rather than the dynamic loader

@ -0,0 +1,6 @@
Zum Konfigurieren muss der Pfad zur Installation des gepatchten Qts angegeben werden, z.B.:
./bootstrap.sh && \
QMAKE=/usr/local/Trolltech/Qt-4.6.3/bin/qmake ./configure && \
make

@ -73,6 +73,7 @@ AM_PATH_CPPUNIT([1.0.0], [have_cppunit="yes"], [have_cppunit="no"])
# Special Options
AC_CHECK_PROGS([QMAKE], [qmake-qt4 qmake-mac qmake])
test -n "$QMAKE" || AC_MSG_ERROR([qmake for Qt 4 not found!])
AC_MSG_NOTICE([QMAKE IS: $QMAKE])
AC_SUBST(QMAKE)
AC_CHECK_PROGS([LRELEASE], [lrelease-qt4 lrelease-mac lrelease])
test -n "$LRELEASE" || AC_MSG_ERROR([lrelease for Qt 4 not found!])

@ -26,7 +26,7 @@
#include <cassert>
#include <QtCore/QDebug>
#define LOG qDebug()<<__PRETTY_FUNCTION__;
#define LOG qDebug()<<__PRETTY_FUNCTION__
class SslClientAuthNetworkAccessManager: public QNetworkAccessManager {
Q_OBJECT;
@ -42,7 +42,7 @@ class SslClientAuthNetworkAccessManager: public QNetworkAccessManager {
virtual QNetworkReply* createRequest(Operation op,
const QNetworkRequest& req,
QIODevice* outgoingData = 0 ) {
LOG;
LOG<<req.url();
QNetworkReply* rep
(QNetworkAccessManager::createRequest(op, req, outgoingData));
//qDebug()<<"Reply created: "<<(int)rep;
@ -60,7 +60,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
Browser(const QString& url, bool kiosk = false, bool proxydetection = true):
_url(0), _home(url), _proxy(0),
_kiosk(kiosk) {
LOG;
LOG<<url;
if (!check(url))
throw std::runtime_error(tr("access to URL %1 not allowed")
.arg(url).toStdString());
@ -338,7 +338,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
QString networkError(QNetworkReply::NetworkError err) {
LOG;
LOG<<err;
switch (err) {
case QNetworkReply::NoError:
return tr("Network connection successful, remote host can be"
@ -427,7 +427,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void load(QUrl page) {
LOG;
LOG<<page.toString();
statusBar()->showMessage(tr("Checking: %1").arg(page.toString()));
try {
if (!check(page)) {
@ -457,7 +457,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void startDownload(QUrl url) {
LOG;
LOG<<url.toString();
statusBar()->showMessage(tr("Reading: %1").arg(url.toString()));
if (!url.isValid()) {
statusBar()->showMessage(tr("Illegal URL: %1").arg(url.errorString()));
@ -469,7 +469,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void reply_error(QNetworkReply::NetworkError err) {
LOG;
LOG<<err;
statusBar()->showMessage(tr("network error"));
_error += tr("<h2>%1</h2><p>%2</p>")
.arg(tr("Reply Error"))
@ -479,7 +479,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
//! intermediate proxy error
void proxy_error(QNetworkReply::NetworkError err,
QString errStr, QString proxy) {
LOG;
LOG<<err<<errStr;
statusBar()->showMessage(tr("proxy error"));
_error += tr("<h2>%1</h2><p>Proxy: %3</p><p>%2</p><p>%4</p>")
.arg(tr("Possible Proxy Failed"))
@ -490,7 +490,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
//! final proxy error
void proxy_error(QNetworkReply::NetworkError err) {
LOG;
LOG<<err;
statusBar()->showMessage(tr("proxy error"));
_error = tr("<h2>%1</h2><p>%2</p>")
.arg(tr("Connection Cannot Be Established"))
@ -499,7 +499,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void zoom(int i) {
LOG;
LOG<<100.0*i/10.0;
statusBar()->showMessage(tr("Zoom: %1%").arg(100.0*i/10.0));
_browser->setZoomFactor(i/10.0);
}
@ -510,12 +510,12 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void on__browser_urlChanged(const QUrl& url) {
LOG;
LOG<<url.toString();
if (_url) _url->setText(url.toString());
}
void on__browser_linkClicked(const QUrl& url) {
LOG;
LOG<<url.toString();
load(url);
}
@ -525,18 +525,18 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void on__browser_titleChanged(const QString& text) {
LOG;
LOG<<text;
setWindowTitle(trUtf8("%1 - SwissSurfer").arg(text));
}
void on__browser_statusBarMessage(const QString& text) {
LOG;
LOG<<text;
qDebug()<<"Message: "<<text;
if (text.size()) statusBar()->showMessage(tr("Info: %1").arg(text));
}
void on__browser_loadProgress(int i) {
LOG;
LOG<<i;
_progress->setValue(i);
}
@ -553,7 +553,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void on__browser_loadFinished(bool ok) {
LOG;
LOG<<(ok?"success":"error");
if (!ok) {
_browser->setHtml(tr("<html><title>Page Load Error</title>"
"<body><h1>Page Load Error</h1>%1"
@ -814,7 +814,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void databaseQuotaExceeded(QWebFrame* frame, QString databaseName) {
LOG;
LOG<<databaseName;
}
void downloadRequested(const QNetworkRequest& request) {
@ -830,22 +830,22 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void linkClicked(const QUrl& url) {
LOG;
LOG<<url.toString();
}
void linkHovered(const QString& link, const QString& title,
const QString& textContent) {
LOG;
LOG<<link<<title<<textContent;
statusBar()->showMessage(tr("%1", "statusbar for hovered link %1=url")
.arg(link));
}
void loadFinished(bool ok) {
LOG;
LOG<<(ok?"succeess":"error");
}
void loadProgress(int progress) {
LOG;
LOG<<progress;
}
void loadStarted() {
@ -927,7 +927,7 @@ class Browser: public QMainWindow, protected Ui::Browser {
}
void finished(QNetworkReply* reply) {
LOG;
LOG<<(reply->error()==QNetworkReply::NoError?"success":"error");
if (reply->error()!=QNetworkReply::NoError) {
_error += tr("<h2>%1</h2><p>URL: %3</p><p>%2</p>")
.arg(tr("Network Error"))

@ -16,6 +16,7 @@
#include <QtCore/QFileInfo>
#include <QtNetwork/QNetworkProxy>
#include <smartcardauth.hxx>
#include <QtNetwork/QSslConfiguration>
#include <QtNetwork/QSslCertificate>
#include <QtNetwork/QSslKey>
@ -24,6 +25,7 @@
#include <iostream>
#include <sstream>
const QByteArray SWISSSIGN_GOLD_CA_G2
("-----BEGIN CERTIFICATE-----\n"
"MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJ\n"
@ -138,6 +140,7 @@ void notrace(QtMsgType, const char*) {
}
int main(int argv, char** argc) try {
SmartCardAuth scardauth;
// qInstallMsgHandler(notrace);
// std::cout.rdbuf((new std::stringstream)->rdbuf());
// std::cerr.rdbuf((new std::stringstream)->rdbuf());
@ -253,6 +256,8 @@ int main(int argv, char** argc) try {
.arg(QFileInfo(argc[0]).fileName()).toStdString()<<std::endl;
return 1;
}
sslConfig.setPeerVerifyMode(QSslSocket::VerifyPeer);
sslConfig.setOpenSslHook(&scardauth);
QSslConfiguration::setDefaultConfiguration(sslConfig);
//............................................................................
if (urls.size()==0) urls<<QObject::trUtf8("http://swisssign.com");

@ -0,0 +1,37 @@
#include <QtGui>
#include "pindialog.hxx"
PinDialog::PinDialog(QWidget *parent)
: QDialog(parent)
{
label=new QLabel(tr("Enter &PIN:"));
lineEdit=new QLineEdit;
lineEdit->setEchoMode(QLineEdit::Password);
label->setBuddy(lineEdit);
okButton=new QPushButton(tr("&OK"));
okButton->setDefault(true);
cancelButton=new QPushButton(tr("&Cancel"));
connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
QHBoxLayout* tl= new QHBoxLayout;
tl->addWidget(label);
tl->addWidget(lineEdit);
QHBoxLayout* bl= new QHBoxLayout;
bl->addStretch();
bl->addWidget(okButton);
bl->addWidget(cancelButton);
QVBoxLayout* ml= new QVBoxLayout;
ml->addLayout(tl);
ml->addLayout(bl);
setLayout(ml);
}
QString PinDialog::pin() const {
// TODO: Cleanup of internal strings as soon as the PIN is retrieved
return lineEdit ? lineEdit->text() : "";
}

@ -0,0 +1,22 @@
#ifndef PINDIALOG_H
#define PINDIALOG_H
#include <QDialog>
class QLabel;
class QLineEdit;
class QPushButton;
class PinDialog : public QDialog
{
Q_OBJECT
public:
PinDialog(QWidget *parent = 0);
QString pin() const;
private:
QLabel* label;
QLineEdit* lineEdit;
QPushButton* okButton;
QPushButton* cancelButton;
};
#endif // PINDIALOG_H

@ -1,6 +1,9 @@
QT += webkit network gui
CONFIG += release
QMAKE_LIBS += -lproxyface -lcryptoki++
QMAKE_LIBS += -lproxyface -lcryptoki++ -lssl
QMAKE_INCDIR += ../../qt/qt-everywhere-opensource-src-4.6.3/include/Qt \
../../openssl-act-engine/src/
unix {
QMAKE_LIBS += -lproxy
}
@ -18,8 +21,8 @@ TRANSLATIONS = @PACKAGENAME@_en.ts \
@PACKAGENAME@_de.ts \
@PACKAGENAME@_fr.ts \
@PACKAGENAME@_it.ts
SOURCES = main.cxx
HEADERS = browser.hxx
SOURCES = main.cxx smartcardauth.cxx pindialog.cxx
HEADERS = browser.hxx smartcardauth.hxx pindialog.hxx
FORMS = browser.ui
RESOURCES = languages.qrc resources.qrc
TARGET = @PACKAGENAME@

@ -0,0 +1,163 @@
#include "smartcardauth.hxx"
#include "pindialog.hxx"
#include <private/qsslsocket_openssl_symbols_p.h>
#include "engine_sct.h"
#include <string>
#include <QtCore/QCoreApplication>
#include <QtCore/QDebug>
ENGINE* SmartCardAuth::e=NULL;
enum_certs_s* SmartCardAuth::certs_found=NULL;
QWidget* SmartCardAuth::parent=0;
bool SmartCardAuth::pin_configured=false;
bool SmartCardAuth::pin_rejected=false;
QMutex SmartCardAuth::_mutex;
SmartCardAuth::SmartCardAuth(QWidget*) {
//QSslSocketPrivate::ensureInitialized();
ENGINE_load_dynamic();
e = ENGINE_by_id("dynamic");
Q_ASSERT(e);
int r=ENGINE_ctrl_cmd_string(e, "SO_PATH", "../openssl-act-engine/src/.libs/libengine_act.so", 0);
Q_ASSERT(r);
r=ENGINE_ctrl_cmd_string(e, "ID", "act", 0);
Q_ASSERT(r);
r=ENGINE_ctrl_cmd_string(e, "LIST_ADD", "1", 0);
Q_ASSERT(r);
r=ENGINE_ctrl_cmd_string(e, "LOAD", NULL, 0);
Q_ASSERT(r);
if(!r)
{
unsigned int err = 0;
while((err = q_ERR_get_error()))
{
char *str = q_ERR_error_string(err, NULL);
fprintf(stderr,"%s\n", str);
}
}
r=ENGINE_init(e);
}
SmartCardAuth::~SmartCardAuth() {
q_ENGINE_finish(e);
q_ENGINE_cleanup();
}
void SmartCardAuth::setPinDlgParent(QWidget* p) {
parent=p;
}
int SmartCardAuth::client_cert_cb(SSL*, X509 **x509, EVP_PKEY **pkey)
{
while (!_mutex.tryLock()) QCoreApplication::processEvents();
// NB: Keep in mind that this function is called for EVERY SSL connection to be opened.
for(size_t i=certs_found->num_certs;i--;)
{
const char *id_p = certs_found->certificate[i].id;
if(id_p == NULL) continue;
// Name has the format "slot-x-name-SwissSign_digSig" for the certificate/key we're looking for
std::string name(certs_found->certificate[i].name);
qDebug()<<"Certificate:"<<name.c_str();
std::string compare("-name-SwissSign_digSig");
// Compare the rightmost part of the retrieved name to locate the certificate/keypair
size_t pos = name.length() - compare.length();
if(name.substr(pos) != compare)
continue;
// Here we found a suitable certificate.
// Now prepare the reference to the SmartCard's private key and a copy of the certificate
// to pass back to the caller.
*x509 = q_X509_dup(certs_found->certificate[i].cert);
*pkey = NULL;
// If we don't have a PIN yet, pop up a dialog, ask for a PIN and pass it along to the engine
// for usage.
if(!pin_configured)
{
PinDialog dlg(parent);
int ok=dlg.exec();
if(ok!=1) {_mutex.unlock(); return 0;} // User cancelled
QByteArray pinByteArray=dlg.pin().toAscii();
char *pin_str = pinByteArray.data();
// The engine control command takes a copy and overwrites the source array
if(q_ENGINE_ctrl_cmd_string(e, "PIN", pin_str, 0))
pin_configured = true;
else
{_mutex.unlock(); return 0;} // Engine refuses to take the PIN
*pkey = q_ENGINE_load_private_key(e, id_p, NULL, NULL);
// We do a test authorization on loading of the private key. If the operation fails at all,
// DON'T try again (see below) or we would instantly lock the card in a single session because
// of the retries!
if(!*pkey)
pin_rejected = true;
}
// Second to nth iteration: We skipped the PIN dialog here, now load the key if we don't have the
// explicit information not to do it (because the PIN is wrong)
if(!*pkey && !pin_rejected)
*pkey = q_ENGINE_load_private_key(e, id_p, NULL, NULL);
break;
}
if(!*x509) {
qWarning("Unable to load certificate");
_mutex.unlock();
return 0;
}
if(!*pkey) {
qWarning("Unable to load key");
_mutex.unlock();
return 0;
}
_mutex.unlock();
return 1;
}
bool SmartCardAuth::hookInitSslContext(SSL_CTX *ctx)
{
bool result = false;
if(!certs_found)
result = (q_ENGINE_ctrl_cmd(e, "ENUM_CERTS", 0, &certs_found, NULL, 0) != 0);
else
result = true;
#ifdef USE_CERTIFICATE_FILE
// Load a specific intermediate certificate from a file
//! @todo PEM-File
BIO* cert_file= q_BIO_new_file("swsign_interm.pem", "r");
X509* interm=q_PEM_read_bio_X509(cert_file,NULL,NULL, NULL);
q_BIO_free(cert_file);
q_SSL_CTX_add_extra_chain_cert(ctx,interm);
#else
// Add all of the card's certificates without a private key as intermediate certs
for(size_t i=certs_found->num_certs;i--;)
{
if(certs_found->certificate[i].id == NULL)
q_SSL_CTX_add_extra_chain_cert(ctx, q_X509_dup(certs_found->certificate[i].cert));
}
#endif
q_SSL_CTX_set_client_cert_cb(ctx, client_cert_cb);
return true;
}

@ -0,0 +1,30 @@
#ifndef SMARTCARDAUTH_H
#define SMARTCARDAUTH_H
#include <private/qopensslhook_p.h>
#include <QtCore/QMutex>
class QWidget;
struct enum_certs_s;
class SmartCardAuth : public QOpenSslHook {
public:
SmartCardAuth(QWidget* parent=0);
~SmartCardAuth();
static void setPinDlgParent(QWidget* parent);
virtual bool hookInitSslContext(SSL_CTX* ctx);
private:
static int client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
static ENGINE* e;
static enum_certs_s* certs_found;
static QWidget* parent;
static bool pin_configured;
static bool pin_rejected;
static QMutex _mutex;
};
#endif // SMARTCARDAUTH_H

@ -113,63 +113,63 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="434"/>
<location filename="browser.hxx" line="431"/>
<source>Checking: %1</source>
<oldsource>Opening: %1</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="464"/>
<location filename="browser.hxx" line="461"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="477"/>
<location filename="browser.hxx" line="498"/>
<location filename="browser.hxx" line="474"/>
<location filename="browser.hxx" line="495"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;%2&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="478"/>
<location filename="browser.hxx" line="475"/>
<source>Reply Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="936"/>
<location filename="browser.hxx" line="933"/>
<source>Network Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="506"/>
<location filename="browser.hxx" line="503"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="532"/>
<location filename="browser.hxx" line="529"/>
<source>%1 - SwissSurfer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="561"/>
<location filename="browser.hxx" line="558"/>
<source>&lt;html&gt;&lt;title&gt;Page Load Error&lt;/title&gt;&lt;body&gt;&lt;h1&gt;Page Load Error&lt;/h1&gt;%1&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="905"/>
<location filename="browser.hxx" line="925"/>
<location filename="browser.hxx" line="935"/>
<location filename="browser.hxx" line="902"/>
<location filename="browser.hxx" line="922"/>
<location filename="browser.hxx" line="932"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="955"/>
<location filename="browser.hxx" line="952"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %4&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;h3&gt;SSL Errors&lt;/h3&gt;&lt;p&gt;&lt;ul&gt;%3&lt;/ul&gt;&lt;/p&gt;</source>
<oldsource>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;h3&gt;SSL Errors&lt;/h3&gt;&lt;p&gt;&lt;ul&gt;%3&lt;/ul&gt;&lt;/p&gt;</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="906"/>
<location filename="browser.hxx" line="903"/>
<source>Unsuported Content</source>
<translation type="unfinished"></translation>
</message>
@ -284,109 +284,127 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="466"/>
<location filename="browser.hxx" line="463"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="476"/>
<location filename="browser.hxx" line="473"/>
<source>network error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="486"/>
<location filename="browser.hxx" line="497"/>
<location filename="browser.hxx" line="483"/>
<location filename="browser.hxx" line="494"/>
<source>proxy error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="487"/>
<location filename="browser.hxx" line="484"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;Proxy: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;%4&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="488"/>
<location filename="browser.hxx" line="485"/>
<source>Possible Proxy Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="499"/>
<location filename="browser.hxx" line="496"/>
<source>Connection Cannot Be Established</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="538"/>
<location filename="browser.hxx" line="535"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="566"/>
<location filename="browser.hxx" line="563"/>
<source>download error</source>
<oldsource>donload error</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="568"/>
<location filename="browser.hxx" line="565"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="842"/>
<location filename="browser.hxx" line="839"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="904"/>
<location filename="browser.hxx" line="901"/>
<source>unsupported content</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="438"/>
<location filename="browser.hxx" line="435"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="439"/>
<location filename="browser.hxx" line="436"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="440"/>
<location filename="browser.hxx" line="437"/>
<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="924"/>
<location filename="browser.hxx" line="921"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="926"/>
<location filename="browser.hxx" line="923"/>
<source>Authentication Required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="950"/>
<location filename="browser.hxx" line="947"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="954"/>
<location filename="browser.hxx" line="951"/>
<source>&lt;li&gt;%1&lt;/li&gt;</source>
<comment>single ssl error</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="958"/>
<location filename="browser.hxx" line="955"/>
<source>SSL Error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PinDialog</name>
<message>
<location filename="pindialog.cxx" line="8"/>
<source>Enter &amp;PIN:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="pindialog.cxx" line="13"/>
<source>&amp;OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="pindialog.cxx" line="16"/>
<source>&amp;Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="main.cxx" line="200"/>
<location filename="main.cxx" line="203"/>
<source>Usage: %1 [OPTIONS...] [&lt;url&gt; ...]
Options:
-h, --help show this help text
@ -417,33 +435,33 @@ Environment:
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="229"/>
<location filename="main.cxx" line="232"/>
<source>Cannot read PEM certificate from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="235"/>
<location filename="main.cxx" line="238"/>
<source>Read PEM certificates from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="242"/>
<location filename="main.cxx" line="245"/>
<source>Cannot read PEM RSA key from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="247"/>
<location filename="main.cxx" line="250"/>
<source>Read private key from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="252"/>
<location filename="main.cxx" line="255"/>
<source>Too few arguments.
Try: %1 --help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="258"/>
<location filename="main.cxx" line="263"/>
<source>http://swisssign.com</source>
<translation type="unfinished"></translation>
</message>

@ -113,63 +113,63 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="434"/>
<location filename="browser.hxx" line="431"/>
<source>Checking: %1</source>
<oldsource>Opening: %1</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="464"/>
<location filename="browser.hxx" line="461"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="477"/>
<location filename="browser.hxx" line="498"/>
<location filename="browser.hxx" line="474"/>
<location filename="browser.hxx" line="495"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;%2&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="478"/>
<location filename="browser.hxx" line="475"/>
<source>Reply Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="936"/>
<location filename="browser.hxx" line="933"/>
<source>Network Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="506"/>
<location filename="browser.hxx" line="503"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="532"/>
<location filename="browser.hxx" line="529"/>
<source>%1 - SwissSurfer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="561"/>
<location filename="browser.hxx" line="558"/>
<source>&lt;html&gt;&lt;title&gt;Page Load Error&lt;/title&gt;&lt;body&gt;&lt;h1&gt;Page Load Error&lt;/h1&gt;%1&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="905"/>
<location filename="browser.hxx" line="925"/>
<location filename="browser.hxx" line="935"/>
<location filename="browser.hxx" line="902"/>
<location filename="browser.hxx" line="922"/>
<location filename="browser.hxx" line="932"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="955"/>
<location filename="browser.hxx" line="952"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %4&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;h3&gt;SSL Errors&lt;/h3&gt;&lt;p&gt;&lt;ul&gt;%3&lt;/ul&gt;&lt;/p&gt;</source>
<oldsource>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;h3&gt;SSL Errors&lt;/h3&gt;&lt;p&gt;&lt;ul&gt;%3&lt;/ul&gt;&lt;/p&gt;</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="906"/>
<location filename="browser.hxx" line="903"/>
<source>Unsuported Content</source>
<translation type="unfinished"></translation>
</message>
@ -284,109 +284,127 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="466"/>
<location filename="browser.hxx" line="463"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="476"/>
<location filename="browser.hxx" line="473"/>
<source>network error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="486"/>
<location filename="browser.hxx" line="497"/>
<location filename="browser.hxx" line="483"/>
<location filename="browser.hxx" line="494"/>
<source>proxy error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="487"/>
<location filename="browser.hxx" line="484"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;Proxy: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;%4&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="488"/>
<location filename="browser.hxx" line="485"/>
<source>Possible Proxy Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="499"/>
<location filename="browser.hxx" line="496"/>
<source>Connection Cannot Be Established</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="538"/>
<location filename="browser.hxx" line="535"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="566"/>
<location filename="browser.hxx" line="563"/>
<source>download error</source>
<oldsource>donload error</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="568"/>
<location filename="browser.hxx" line="565"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="842"/>
<location filename="browser.hxx" line="839"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="904"/>
<location filename="browser.hxx" line="901"/>
<source>unsupported content</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="438"/>
<location filename="browser.hxx" line="435"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="439"/>
<location filename="browser.hxx" line="436"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="440"/>
<location filename="browser.hxx" line="437"/>
<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="924"/>
<location filename="browser.hxx" line="921"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="926"/>
<location filename="browser.hxx" line="923"/>
<source>Authentication Required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="950"/>
<location filename="browser.hxx" line="947"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="954"/>
<location filename="browser.hxx" line="951"/>
<source>&lt;li&gt;%1&lt;/li&gt;</source>
<comment>single ssl error</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="958"/>
<location filename="browser.hxx" line="955"/>
<source>SSL Error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PinDialog</name>
<message>
<location filename="pindialog.cxx" line="8"/>
<source>Enter &amp;PIN:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="pindialog.cxx" line="13"/>
<source>&amp;OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="pindialog.cxx" line="16"/>
<source>&amp;Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="main.cxx" line="200"/>
<location filename="main.cxx" line="203"/>
<source>Usage: %1 [OPTIONS...] [&lt;url&gt; ...]
Options:
-h, --help show this help text
@ -417,33 +435,33 @@ Environment:
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="229"/>
<location filename="main.cxx" line="232"/>
<source>Cannot read PEM certificate from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="235"/>
<location filename="main.cxx" line="238"/>
<source>Read PEM certificates from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="242"/>
<location filename="main.cxx" line="245"/>
<source>Cannot read PEM RSA key from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="247"/>
<location filename="main.cxx" line="250"/>
<source>Read private key from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="252"/>
<location filename="main.cxx" line="255"/>
<source>Too few arguments.
Try: %1 --help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="258"/>
<location filename="main.cxx" line="263"/>
<source>http://swisssign.com</source>
<translation type="unfinished"></translation>
</message>

@ -113,63 +113,63 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="434"/>
<location filename="browser.hxx" line="431"/>
<source>Checking: %1</source>
<oldsource>Opening: %1</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="464"/>
<location filename="browser.hxx" line="461"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="477"/>
<location filename="browser.hxx" line="498"/>
<location filename="browser.hxx" line="474"/>
<location filename="browser.hxx" line="495"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;%2&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="478"/>
<location filename="browser.hxx" line="475"/>
<source>Reply Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="936"/>
<location filename="browser.hxx" line="933"/>
<source>Network Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="506"/>
<location filename="browser.hxx" line="503"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="532"/>
<location filename="browser.hxx" line="529"/>
<source>%1 - SwissSurfer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="561"/>
<location filename="browser.hxx" line="558"/>
<source>&lt;html&gt;&lt;title&gt;Page Load Error&lt;/title&gt;&lt;body&gt;&lt;h1&gt;Page Load Error&lt;/h1&gt;%1&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="905"/>
<location filename="browser.hxx" line="925"/>
<location filename="browser.hxx" line="935"/>
<location filename="browser.hxx" line="902"/>
<location filename="browser.hxx" line="922"/>
<location filename="browser.hxx" line="932"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="955"/>
<location filename="browser.hxx" line="952"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %4&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;h3&gt;SSL Errors&lt;/h3&gt;&lt;p&gt;&lt;ul&gt;%3&lt;/ul&gt;&lt;/p&gt;</source>
<oldsource>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;h3&gt;SSL Errors&lt;/h3&gt;&lt;p&gt;&lt;ul&gt;%3&lt;/ul&gt;&lt;/p&gt;</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="906"/>
<location filename="browser.hxx" line="903"/>
<source>Unsuported Content</source>
<translation type="unfinished"></translation>
</message>
@ -284,109 +284,127 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="466"/>
<location filename="browser.hxx" line="463"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="476"/>
<location filename="browser.hxx" line="473"/>
<source>network error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="486"/>
<location filename="browser.hxx" line="497"/>
<location filename="browser.hxx" line="483"/>
<location filename="browser.hxx" line="494"/>
<source>proxy error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="487"/>
<location filename="browser.hxx" line="484"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;Proxy: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;%4&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="488"/>
<location filename="browser.hxx" line="485"/>
<source>Possible Proxy Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="499"/>
<location filename="browser.hxx" line="496"/>
<source>Connection Cannot Be Established</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="538"/>
<location filename="browser.hxx" line="535"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="566"/>
<location filename="browser.hxx" line="563"/>
<source>download error</source>
<oldsource>donload error</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="568"/>
<location filename="browser.hxx" line="565"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="842"/>
<location filename="browser.hxx" line="839"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="904"/>
<location filename="browser.hxx" line="901"/>
<source>unsupported content</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="438"/>
<location filename="browser.hxx" line="435"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="439"/>
<location filename="browser.hxx" line="436"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="440"/>
<location filename="browser.hxx" line="437"/>
<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="924"/>
<location filename="browser.hxx" line="921"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="926"/>
<location filename="browser.hxx" line="923"/>
<source>Authentication Required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="950"/>
<location filename="browser.hxx" line="947"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="954"/>
<location filename="browser.hxx" line="951"/>
<source>&lt;li&gt;%1&lt;/li&gt;</source>
<comment>single ssl error</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="958"/>
<location filename="browser.hxx" line="955"/>
<source>SSL Error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PinDialog</name>
<message>
<location filename="pindialog.cxx" line="8"/>
<source>Enter &amp;PIN:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="pindialog.cxx" line="13"/>
<source>&amp;OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="pindialog.cxx" line="16"/>
<source>&amp;Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="main.cxx" line="200"/>
<location filename="main.cxx" line="203"/>
<source>Usage: %1 [OPTIONS...] [&lt;url&gt; ...]
Options:
-h, --help show this help text
@ -417,33 +435,33 @@ Environment:
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="229"/>
<location filename="main.cxx" line="232"/>
<source>Cannot read PEM certificate from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="235"/>
<location filename="main.cxx" line="238"/>
<source>Read PEM certificates from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="242"/>
<location filename="main.cxx" line="245"/>
<source>Cannot read PEM RSA key from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="247"/>
<location filename="main.cxx" line="250"/>
<source>Read private key from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="252"/>
<location filename="main.cxx" line="255"/>
<source>Too few arguments.
Try: %1 --help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="258"/>
<location filename="main.cxx" line="263"/>
<source>http://swisssign.com</source>
<translation type="unfinished"></translation>
</message>

@ -113,63 +113,63 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="434"/>
<location filename="browser.hxx" line="431"/>
<source>Checking: %1</source>
<oldsource>Opening: %1</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="464"/>
<location filename="browser.hxx" line="461"/>
<source>Reading: %1</source>
<oldsource>Reading: %1%</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="477"/>
<location filename="browser.hxx" line="498"/>
<location filename="browser.hxx" line="474"/>
<location filename="browser.hxx" line="495"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;%2&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="478"/>
<location filename="browser.hxx" line="475"/>
<source>Reply Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="936"/>
<location filename="browser.hxx" line="933"/>
<source>Network Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="506"/>
<location filename="browser.hxx" line="503"/>
<source>Zoom: %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="532"/>
<location filename="browser.hxx" line="529"/>
<source>%1 - SwissSurfer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="561"/>
<location filename="browser.hxx" line="558"/>
<source>&lt;html&gt;&lt;title&gt;Page Load Error&lt;/title&gt;&lt;body&gt;&lt;h1&gt;Page Load Error&lt;/h1&gt;%1&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="905"/>
<location filename="browser.hxx" line="925"/>
<location filename="browser.hxx" line="935"/>
<location filename="browser.hxx" line="902"/>
<location filename="browser.hxx" line="922"/>
<location filename="browser.hxx" line="932"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="955"/>
<location filename="browser.hxx" line="952"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %4&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;h3&gt;SSL Errors&lt;/h3&gt;&lt;p&gt;&lt;ul&gt;%3&lt;/ul&gt;&lt;/p&gt;</source>
<oldsource>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;URL: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;h3&gt;SSL Errors&lt;/h3&gt;&lt;p&gt;&lt;ul&gt;%3&lt;/ul&gt;&lt;/p&gt;</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="906"/>
<location filename="browser.hxx" line="903"/>
<source>Unsuported Content</source>
<translation type="unfinished"></translation>
</message>
@ -284,109 +284,127 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="466"/>
<location filename="browser.hxx" line="463"/>
<source>Illegal URL: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="476"/>
<location filename="browser.hxx" line="473"/>
<source>network error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="486"/>
<location filename="browser.hxx" line="497"/>
<location filename="browser.hxx" line="483"/>
<location filename="browser.hxx" line="494"/>
<source>proxy error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="487"/>
<location filename="browser.hxx" line="484"/>
<source>&lt;h2&gt;%1&lt;/h2&gt;&lt;p&gt;Proxy: %3&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;%4&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="488"/>
<location filename="browser.hxx" line="485"/>
<source>Possible Proxy Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="499"/>
<location filename="browser.hxx" line="496"/>
<source>Connection Cannot Be Established</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="538"/>
<location filename="browser.hxx" line="535"/>
<source>Info: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="566"/>
<location filename="browser.hxx" line="563"/>
<source>download error</source>
<oldsource>donload error</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="568"/>
<location filename="browser.hxx" line="565"/>
<source>done.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="842"/>
<location filename="browser.hxx" line="839"/>
<source>%1</source>
<comment>statusbar for hovered link %1=url</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="904"/>
<location filename="browser.hxx" line="901"/>
<source>unsupported content</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="438"/>
<location filename="browser.hxx" line="435"/>
<source>Forbidden: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="439"/>
<location filename="browser.hxx" line="436"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="440"/>
<location filename="browser.hxx" line="437"/>
<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="924"/>
<location filename="browser.hxx" line="921"/>
<source>authentication required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="926"/>
<location filename="browser.hxx" line="923"/>
<source>Authentication Required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="950"/>
<location filename="browser.hxx" line="947"/>
<source>ssl error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="954"/>
<location filename="browser.hxx" line="951"/>
<source>&lt;li&gt;%1&lt;/li&gt;</source>
<comment>single ssl error</comment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="browser.hxx" line="958"/>
<location filename="browser.hxx" line="955"/>
<source>SSL Error</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PinDialog</name>
<message>
<location filename="pindialog.cxx" line="8"/>
<source>Enter &amp;PIN:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="pindialog.cxx" line="13"/>
<source>&amp;OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="pindialog.cxx" line="16"/>
<source>&amp;Cancel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="main.cxx" line="200"/>
<location filename="main.cxx" line="203"/>
<source>Usage: %1 [OPTIONS...] [&lt;url&gt; ...]
Options:
-h, --help show this help text
@ -417,33 +435,33 @@ Environment:
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="229"/>
<location filename="main.cxx" line="232"/>
<source>Cannot read PEM certificate from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="235"/>
<location filename="main.cxx" line="238"/>
<source>Read PEM certificates from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="242"/>
<location filename="main.cxx" line="245"/>
<source>Cannot read PEM RSA key from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="247"/>
<location filename="main.cxx" line="250"/>
<source>Read private key from file: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="252"/>
<location filename="main.cxx" line="255"/>
<source>Too few arguments.
Try: %1 --help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="main.cxx" line="258"/>
<location filename="main.cxx" line="263"/>
<source>http://swisssign.com</source>
<translation type="unfinished"></translation>
</message>

Loading…
Cancel
Save