improve messages and usability

- update german translation
This commit is contained in:
Christian Hohnstaedt 2010-02-20 13:41:59 +01:00
parent 6aacdb121b
commit 345cdc1083
47 changed files with 2530 additions and 1879 deletions

View File

@ -1,41 +1,41 @@
Copyright (C) 2001 - 2009 Christian Hohnstaedt.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of the author nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This program links to software with different licenses from:
- http://www.openssl.org which includes cryptographic software
written by Eric Young (eay@cryptsoft.com)"
- http://www.trolltech.com
Copyright (C) 2001 - 2010 Christian Hohnstaedt.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of the author nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This program links to software with different licenses from:
- http://www.openssl.org which includes cryptographic software
written by Eric Young (eay@cryptsoft.com)"
- http://www.trolltech.com

View File

@ -1,4 +1,5 @@
* improve messages, usability and german translation
* improve token support
- token initializing
- creating keys on a token

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,11 +3,11 @@ ifeq ($(TOPDIR),)
TOPDIR=..
endif
MOCNAMES=db_crl db_key db_temp db_x509 db_x509req db_x509super db_base
MOCNAMES=db_crl db_key db_temp db_x509 db_x509req db_x509super db_base pki_base
NAMES=$(MOCNAMES) asn1int oid pki_pkcs7 x509rev asn1time \
pki_temp x509v3ext pki_x509 func pki_crl pki_x509req \
load_obj pki_key pki_x509super main pki_pkcs12 x509name db import \
pki_multi pki_evp pki_scard pk11_attribute pki_base pkcs11
pki_multi pki_evp pki_scard pk11_attribute pkcs11
OBJS=$(patsubst %, %.o, $(NAMES)) $(patsubst %, moc_%.o, $(MOCNAMES))

View File

@ -183,7 +183,7 @@ void db::rename(enum pki_type type, QString name, QString n)
fileIOerr("write");
}
if (ret != sizeof(head)) {
throw errorEx(QObject::tr("DB: Write error %1 - %1"
throw errorEx(QObject::tr("DB: Write error %1 - %2"
).arg(ret).arg(sizeof(head)));
}
}

View File

@ -127,7 +127,7 @@ void db_base::delete_ask()
pki_base *pki = static_cast<pki_base*>(currentIdx.internalPointer());
if (QMessageBox::information(mainwin, XCA_TITLE,
delete_txt + ": " + pki->getIntName() + " ?\n",
delete_txt.arg(pki->getIntName()),
QMessageBox::Ok | QMessageBox::Cancel) !=
QMessageBox::Ok)
return;
@ -172,7 +172,8 @@ void db_base::deleteSelectedItems(XcaTreeView* view)
{
QModelIndexList indexes = view->getSelectedIndexes();
QModelIndex index;
QString items;
QString items, single, msg;
int count = 0;
if (indexes.count() == 0)
return;
@ -182,10 +183,15 @@ void db_base::deleteSelectedItems(XcaTreeView* view)
continue;
pki_base *pki = static_cast<pki_base*>(index.internalPointer());
items += "'" + pki->getIntName() + "' ";
single = pki->getIntName();
count++;
}
if (count == 1)
msg = delete_txt.arg(single);
else
msg = delete_multi_txt.arg(count).arg(items);
if (QMessageBox::information(mainwin, XCA_TITLE,
delete_txt + ": " + items + " ?\n" ,
if (QMessageBox::information(mainwin, XCA_TITLE, msg,
QMessageBox::Ok | QMessageBox::Cancel) !=
QMessageBox::Ok)
return;

View File

@ -32,7 +32,7 @@ class db_base: public QAbstractItemModel
Q_OBJECT
protected:
QString dbName, delete_txt;
QString dbName, delete_txt, delete_multi_txt;
QModelIndex currentIdx;
void _writePKI(pki_base *pki, bool overwrite );
void _removePKI(pki_base *pki );

View File

@ -19,7 +19,8 @@ db_crl::db_crl(QString db, MainWindow *mw)
{
headertext << tr("Name") << tr("Signer") << tr("Common name") <<
tr("No. revoked") << tr("Next update");
delete_txt = tr("Delete the revokation list(s)");
delete_txt = tr("Delete the revokation list '%1' ?");
delete_multi_txt = tr("Delete the %1 revokation lists: %2 ?");
view = mw->crlView;
class_name = "crls";
pkitype[0] = revokation;
@ -91,9 +92,7 @@ pki_base *db_crl::insert(pki_base *item)
pki_crl *oldcrl = (pki_crl *)getByReference(crl);
if (oldcrl) {
QMessageBox::information(mainwin, XCA_TITLE,
tr("The revokation list already exists in the database as") +
":\n'" + oldcrl->getIntName() +
"'\n" + tr("and so it was not imported"));
tr("The revokation list already exists in the database as:\n'%1'\nand so it was not imported").arg(oldcrl->getIntName()));
delete(crl);
return oldcrl;
}

View File

@ -34,7 +34,8 @@ db_key::db_key(QString db, MainWindow *mw)
{
rootItem->setIntName("[key root]");
headertext << "Name" << "Type" << "Size" << "Use" << "Password";
delete_txt = tr("Delete the key(s)");
delete_txt = tr("Delete the key '%1' ?");
delete_multi_txt = tr("Delete the %1 keys: %2 ?");
view = mw->keyView;
class_name = "keys";
pkitype[0] = asym_key;
@ -93,17 +94,13 @@ pki_base* db_key::insert(pki_base *item)
if (oldkey != NULL) {
if ((oldkey->isPrivKey() && lkey->isPrivKey()) || lkey->isPubKey()){
QMessageBox::information(mainwin, XCA_TITLE,
tr("The key is already in the database as") +":\n'" +
oldkey->getIntName() +
"'\n" + tr("and is not going to be imported"));
tr("The key is already in the database as:\n'%1'\nand is not going to be imported").arg(oldkey->getIntName()));
delete(lkey);
return oldkey;
}
else {
QMessageBox::information(mainwin, XCA_TITLE,
tr("The database already contains the public part of the imported key as") +":\n'" +
oldkey->getIntName() +
"'\n" + tr("and will be completed by the new, private part of the key"));
tr("The database already contains the public part of the imported key as\n'%1\nand will be completed by the new, private part of the key").arg(oldkey->getIntName()));
lkey->setIntName(oldkey->getIntName());
currentIdx = index(oldkey->row(), 0, QModelIndex());
deletePKI();
@ -141,10 +138,10 @@ void db_key::newItem(QString name)
return;
}
if (ksize < 1024 || ksize > 8192)
if (!QMessageBox::warning(NULL, XCA_TITLE,
tr("You are sure to create a key of the size: ")
+QString::number(ksize) + " ?", tr("Cancel"),
tr("Create") ))
if (QMessageBox::warning(NULL, XCA_TITLE,
tr("You are sure to create a key of the size: %1 ?").arg(ksize),
QMessageBox::Yes | QMessageBox::No) !=
QMessageBox::Yes)
{
delete dlg;
return;

View File

@ -21,7 +21,8 @@ db_temp::db_temp(QString DBfile, MainWindow *mw)
:db_base(DBfile, mw)
{
headertext << "Name" << "Type";
delete_txt = tr("Delete the template(s)");
delete_txt = tr("Delete the template '%1' ?");
delete_multi_txt = tr("Delete the %1 templates: %2 ?");
view = mw->tempView;
class_name = "templates";
pkitype[0] = tmpl;
@ -48,7 +49,7 @@ db_temp::db_temp(QString DBfile, MainWindow *mw)
predefs->append(tmpl);
} catch(errorEx &err) {
QMessageBox::warning(mainwin, tr(XCA_TITLE),
tr("Bad template: ") + name);
tr("Bad template: %1").arg(name));
}
}
}

View File

@ -30,7 +30,8 @@ db_x509::db_x509(QString DBfile, MainWindow *mw)
headertext << tr("Internal name") << tr("Common name") << tr("Serial") <<
tr("not After") << tr("Trust state") << tr("Revocation");
delete_txt = tr("Delete the certificate(s)");
delete_txt = tr("Delete the certificate '%1' ?");
delete_multi_txt =tr("Delete the %1 certificates: %2 ?");
view = mw->certView;
class_name = "certificates";
pkitype[0] = x509;
@ -289,9 +290,7 @@ pki_base *db_x509::insert(pki_base *item)
pki_x509 *oldcert = (pki_x509 *)getByReference(cert);
if (oldcert) {
QMessageBox::information(mainwin, XCA_TITLE,
tr("The certificate already exists in the database as") +":\n'" +
oldcert->getIntName() +
"'\n" + tr("and so it was not imported"));
tr("The certificate already exists in the database as:\n'%1'\nand so it was not imported").arg(oldcert->getIntName()));
delete(cert);
return oldcert;
}
@ -459,7 +458,7 @@ void db_x509::newCert(NewX509 *dlg)
break;
else
QMessageBox::warning(mainwin, XCA_TITLE,
tr("The two secret numbers don't match."));
tr("The two secret numbers don't match."));
}
delete dlg1;
if (A!=B)
@ -497,14 +496,6 @@ void db_x509::newCert(NewX509 *dlg)
cert->setNotAfter(a);
if (cert->resetTimes(signcert) > 0) {
if (QMessageBox::information(mainwin, XCA_TITLE,
tr("The validity times for the certificate need to get adjusted to not exceed those of the signer"),
tr("Continue creation"), tr("Abort")
))
throw errorEx("");
}
// STEP 4 handle extensions
if (dlg->copyReqExtCB->isChecked() && dlg->fromReqCB->isChecked()) {
extList el = req->getV3ext();
@ -714,15 +705,15 @@ void db_x509::store()
case 11: // Certificate and Key in PEM format for apache
pki_evp *privkey = (pki_evp *)crt->getRefKey();
if (!privkey || privkey->isPubKey()) {
QMessageBox::warning(mainwin, tr(XCA_TITLE),
tr("There was no key found for the Certificate: ") +
crt->getIntName() );
QMessageBox::warning(mainwin, XCA_TITLE,
tr("There was no key found for the Certificate: '%1'").
arg(crt->getIntName()));
return;
}
if (privkey->isToken()) {
QMessageBox::warning(mainwin, tr(XCA_TITLE),
tr("Not possible for smart card key:") +
crt->getIntName() );
QMessageBox::warning(mainwin, XCA_TITLE,
tr("Not possible for smart card key: '%1'").
arg(crt->getIntName()));
return;
}
@ -747,15 +738,14 @@ void db_x509::writePKCS12(pki_x509 *cert, QString s, bool chain)
try {
pki_evp *privkey = (pki_evp *)cert->getRefKey();
if (!privkey || privkey->isPubKey()) {
QMessageBox::warning(mainwin, tr(XCA_TITLE),
tr("There was no key found for the Certificate: ") +
cert->getIntName() );
QMessageBox::warning(mainwin, XCA_TITLE,
tr("There was no key found for the Certificate: '%1'").arg(cert->getIntName()));
return;
}
if (privkey->isToken()) {
QMessageBox::warning(mainwin, tr(XCA_TITLE),
tr("Not possible for a token-key for the Certificate: ") +
cert->getIntName() );
QMessageBox::warning(mainwin, XCA_TITLE,
tr("Not possible for the token-key Certificate '%1'").
arg(cert->getIntName()));
return;
}
if (s.isEmpty())
@ -912,7 +902,11 @@ void db_x509::deleteFromToken()
if (!currentIdx.isValid())
return;
pki_x509 *pki = static_cast<pki_x509*>(currentIdx.internalPointer());
pki->deleteFromToken();
try {
pki->deleteFromToken();
} catch (errorEx &err) {
mainwin->Error(err);
}
}
void db_x509::setTrust()
@ -955,17 +949,18 @@ void db_x509::extendCert()
a1time time;
a1int serial;
try {
CertExtend *dlg = new CertExtend(mainwin);
if (!dlg->exec()) {
delete dlg;
return;
}
oldcert = static_cast<pki_x509*>(currentIdx.internalPointer());
if (!oldcert ||
!(signer = oldcert->getSigner()) ||
!(signkey = signer->getRefKey()) ||
signkey->isPubKey())
return;
CertExtend *dlg = new CertExtend(mainwin, signer);
if (!dlg->exec()) {
delete dlg;
return;
}
newcert = new pki_x509(oldcert);
serial = signer->getIncCaSerial();
@ -978,17 +973,15 @@ void db_x509::extendCert()
// change date and serial
newcert->setSerial(serial);
newcert->setNotBefore(dlg->notBefore->getDate());
newcert->setNotAfter(dlg->notAfter->getDate());
a1time a;
if (dlg->noWellDefinedExpDate->isChecked())
a.setUndefined();
else
a = dlg->notAfter->getDate();
if (newcert->resetTimes(signer) > 0) {
if (QMessageBox::information(mainwin, XCA_TITLE,
tr("The validity times for the certificate need to get adjusted to not exceed those of the signer"),
tr("Continue creation"), tr("Abort")
))
throw errorEx("");
}
newcert->setNotAfter(a);
// and finally sign the request
// and finally sign the cert
newcert->sign(signkey, oldcert->getDigest());
insert(newcert);
delete dlg;

View File

@ -19,7 +19,8 @@ db_x509req::db_x509req(QString DBfile, MainWindow *mw)
:db_x509super(DBfile, mw)
{
headertext << tr("Name") << tr("Subject") << tr("Signed");
delete_txt = tr("Delete the request(s)");
delete_txt = tr("Delete the request '%1' ?");
delete_multi_txt = tr("Delete the %1 requests: %2 ?");
view = mw->reqView;
class_name = "requests";
pkitype[0] = x509_req;
@ -38,9 +39,7 @@ pki_base *db_x509req::insert(pki_base *item)
oldreq = (pki_x509req *)getByReference(req);
if (oldreq) {
QMessageBox::information(mainwin, XCA_TITLE,
tr("The certificate signing request already exists in the database as") +":\n'" +
oldreq->getIntName() +
"'\n" + tr("and thus was not stored"));
tr("The certificate signing request already exists in the database as\n'%1'\nand thus was not stored").arg(oldreq->getIntName()));
delete(req);
return oldreq;
}

View File

@ -20,6 +20,7 @@
#include <qapplication.h>
#include <qfile.h>
#include <qstringlist.h>
#include <qpushbutton.h>
#ifdef WIN32
#include <windows.h>
@ -189,7 +190,7 @@ void applyTD(QWidget *parent, int number, int range, bool mnc,
t /= SECONDS_PER_DAY;
if (delta + t > 24850) {
QMessageBox::warning(parent, XCA_TITLE,
"Time difference too big\nYou must set it manually." );
QObject::tr("Time difference too big\nYou must set it manually."));
return;
}
nb->setDate(a.now(), midnight);
@ -267,11 +268,14 @@ QString changeFilenameSuffix(QString fn, const QStringList &suffixlist,
bool mayWriteFile(const QString &fname)
{
if (QFile::exists(fname)) {
if (QMessageBox::information(NULL, XCA_TITLE,
QObject::tr("The file: ") + fname +
QObject::tr(" already exists"),
QObject::tr("Do not overwrite"),
QObject::tr("Overwrite")) != 1)
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
QObject::tr("The file: '%1' already exists!").
arg(fname));
msg.addButton(QMessageBox::Ok)->setText(
QObject::tr("Overwrite"));
msg.addButton(QMessageBox::Cancel)->setText(
QObject::tr("Do not overwrite"));
if (msg.exec() != QMessageBox::Ok)
{
return false;
}

View File

@ -166,10 +166,10 @@ QString pkcs11::tokenLogin(QString name, bool so, bool force)
bool need_login;
QString text = so ?
QObject::tr("Please enter the SO PIN (PUK) of the token: "):
QObject::tr("Please enter the PIN of the token: ");
QObject::tr("Please enter the SO PIN (PUK) of the token %1"):
QObject::tr("Please enter the PIN of the token %1");
pass_info p(XCA_TITLE, text + name);
pass_info p(XCA_TITLE, text.arg(name));
p.setPin();
need_login = needsLogin(so);
if (force || need_login) {

View File

@ -37,7 +37,7 @@ enum pki_type pki_base::getType()
pki_base::~pki_base(void)
{
while((childCount()))
delete takeFirst();
delete takeFirst();
pki_counter--;
}
@ -78,8 +78,8 @@ void pki_base::setIntName(const QString &d)
void pki_base::fopen_error(const QString fname)
{
QString txt = tr("Error opening file:") + " '" + fname + "' " +
strerror(errno);
QString txt = tr("Error opening file: '%1': %2").arg(fname).
arg(strerror(errno));
throw errorEx(txt, class_name);
}

View File

@ -16,6 +16,7 @@
class pki_base : public QObject
{
Q_OBJECT
private:
static int pki_counter;
protected:

View File

@ -216,7 +216,7 @@ void pki_evp::fromPEM_BIO(BIO *bio, QString name)
{
EVP_PKEY *pkey;
int pos;
pass_info p(XCA_TITLE, qApp->translate("MainWindow",
pass_info p(XCA_TITLE, QObject::tr(
"Please enter the password to decrypt the private key."));
pos = BIO_tell(bio);
pkey = PEM_read_bio_PrivateKey(bio, NULL, MainWindow::passRead, &p);
@ -264,8 +264,8 @@ static void search_ec_oid(EC_KEY *ec)
void pki_evp::fload(const QString fname)
{
pass_info p(XCA_TITLE, qApp->translate("MainWindow",
"Please enter the password to decrypt the private key.") +
"\n'" + fname + "'");
"Please enter the password to decrypt the private key: '%1'").
arg(fname));
pem_password_cb *cb = MainWindow::passRead;
FILE *fp = fopen(QString2filename(fname), "r");
EVP_PKEY *pkey;
@ -375,8 +375,7 @@ EVP_PKEY *pki_evp::decryptKey() const
if (ownPass == ptPrivate) {
int ret;
pass_info pi(XCA_TITLE, qApp->translate("MainWindow",
"Please enter the password to decrypt the private key: '") +
getIntName() + "'");
"Please enter the password to decrypt the private key: '%1'").arg(getIntName()));
ret = MainWindow::passRead(ownPassBuf, MAX_PASS_LENGTH, 0, &pi);
if (ret < 0)
throw errorEx(tr("Password input aborted"), class_name);
@ -391,8 +390,7 @@ EVP_PKEY *pki_evp::decryptKey() const
int ret;
//printf("Passhash= '%s', new hash= '%s', passwd= '%s'\n",
//CCHAR(passHash), CCHAR(md5passwd(ownPassBuf)), ownPassBuf);
pass_info p(XCA_TITLE, qApp->translate("MainWindow",
"Please enter the database password for decrypting the key"));
pass_info p(XCA_TITLE, tr("Please enter the database password for decrypting the key"));
ret = MainWindow::passRead(ownPassBuf, MAX_PASS_LENGTH, 0, &p);
if (ret < 0)
throw errorEx(tr("Password input aborted"), class_name);
@ -484,9 +482,8 @@ void pki_evp::encryptKey(const char *password)
/* This key has its own, private password */
if (ownPass == ptPrivate) {
int ret;
pass_info p(XCA_TITLE, qApp->translate("MainWindow",
"Please enter the password to protect the private key: '") +
getIntName() + "'");
pass_info p(XCA_TITLE, tr("Please enter the password to protect the private key: '%1'").
arg(getIntName()));
ret = MainWindow::passWrite(ownPassBuf, MAX_PASS_LENGTH, 0, &p);
if (ret < 0)
throw errorEx("Password input aborted", class_name);
@ -499,8 +496,7 @@ void pki_evp::encryptKey(const char *password)
} else {
int ret = 0;
memcpy(ownPassBuf, passwd, MAX_PASS_LENGTH);
pass_info p(XCA_TITLE, qApp->translate("MainWindow",
"Please enter the database password for encrypting the key"));
pass_info p(XCA_TITLE, tr("Please enter the database password for encrypting the key"));
while (md5passwd(ownPassBuf) != passHash &&
sha512passwd(ownPassBuf, passHash) != passHash )
{
@ -588,7 +584,7 @@ void pki_evp::writePKCS8(const QString fname, const EVP_CIPHER *enc,
pem_password_cb *cb, bool pem)
{
EVP_PKEY *pkey;
pass_info p(XCA_TITLE, tr("Please enter the password protecting the PKCS#8 key") + " '" + getIntName() + "'");
pass_info p(XCA_TITLE, tr("Please enter the password protecting the PKCS#8 key '%1'").arg(getIntName()));
FILE *fp = fopen(QString2filename(fname), "w");
if (fp != NULL) {
if (key) {
@ -623,7 +619,7 @@ void pki_evp::writeKey(const QString fname, const EVP_CIPHER *enc,
pem_password_cb *cb, bool pem)
{
EVP_PKEY *pkey;
pass_info p(XCA_TITLE, tr("Please enter the export password for the private key") + " '" + getIntName() + "'");
pass_info p(XCA_TITLE, tr("Please enter the export password for the private key '%1'").arg(getIntName()));
if (isPubKey()) {
writePublic(fname, pem);
return;

View File

@ -20,27 +20,28 @@
class pki_pkcs12: public pki_base
{
friend class pki_x509;
friend class pki_evp;
friend class pki_x509;
friend class pki_evp;
protected:
QString alias;
pki_x509 *cert;
pki_evp *key;
STACK_OF(X509) *certstack;
pem_password_cb *passcb;
public:
protected:
QString alias;
pki_x509 *cert;
pki_evp *key;
STACK_OF(X509) *certstack;
pem_password_cb *passcb;
public:
pki_pkcs12(const QString d, pki_x509 *acert, pki_evp *akey, pem_password_cb *cb);
pki_pkcs12(const QString fname, pem_password_cb *cb);
pki_pkcs12(const QString d, pki_x509 *acert, pki_evp *akey,
pem_password_cb *cb);
pki_pkcs12(const QString fname, pem_password_cb *cb);
~pki_pkcs12();
void addCaCert(pki_x509 *acert);
pki_key *getKey();
pki_x509 *getCert();
pki_x509 *getCa(int x);
int numCa(); // number of ca certs;
void writePKCS12(const QString fname);
~pki_pkcs12();
void addCaCert(pki_x509 *acert);
pki_key *getKey();
pki_x509 *getCert();
pki_x509 *getCa(int x);
int numCa(); // number of ca certs;
void writePKCS12(const QString fname);
};
#endif

View File

@ -43,13 +43,13 @@ QPixmap *pki_scard::icon[1] = { NULL };
if (!ENGINE_ctrl_cmd_string(e, cmd, value, 0)) { \
ENGINE_free(e); \
if (!silent) { \
log += tr("FAILED:") + msg; \
log += QString("FAILED:") + msg; \
openssl_error(log); \
} \
ign_openssl_error(); \
return false; \
} \
log += tr("SUCCESS:") +msg; \
log += QString("SUCCESS:") +msg; \
} while(0);
ENGINE *pki_scard::p11_engine = NULL;
@ -455,13 +455,12 @@ bool pki_scard::prepare_card(unsigned long *slot, bool verifyPubkey) const
}
if (i < p11_slots.count())
break;
QString msg = tr("Please insert card :'") +
card_manufacturer + " [" + card_label +
"] " + tr("with Serial: ") + card_serial;
QString msg = tr("Please insert card: %1 [%2] with Serial: %3").
arg(card_manufacturer).arg(card_label).arg(card_serial);
int r = QMessageBox::warning(NULL, XCA_TITLE, msg,
tr("&OK"), tr("Abort"));
if (r == 1) {
QMessageBox::Cancel | QMessageBox::Ok);
if (r == QMessageBox::Cancel) {
return false;
}
}
@ -486,7 +485,7 @@ bool pki_scard::prepare_card(unsigned long *slot, bool verifyPubkey) const
return true;
if (!object_id.isEmpty())
QMessageBox::warning(NULL, XCA_TITLE,
tr("Public Key missmatch. Please re-import card"), tr("&OK"));
tr("Public Key missmatch. Please re-import card"));
}
return false;
}
@ -580,7 +579,7 @@ void pki_scard::fromData(const unsigned char *p, db_header_t *head )
d2i_PUBKEY(&key, &p1, size - (p1-p));
if (p1-p != size) {
my_error(tr("Wrong Size of scard: ") + getIntName());
my_error(tr("Wrong Size of scard: %1").arg(getIntName()));
}
}
@ -642,8 +641,8 @@ void pki_scard::changePin()
pin = p11.tokenLogin(getIntName(), false, true);
if (pin.isNull())
return;
pass_info p(XCA_TITLE, tr("Please enter the new Pin for the token: ") +
getIntName());
pass_info p(XCA_TITLE, tr("Please enter the new Pin for the token '%1'").
arg(getIntName()));
p.setPin();
int newPinLen = MainWindow::passWrite(newPin, MAX_PASS_LENGTH, 0, &p);
@ -661,8 +660,8 @@ void pki_scard::initPin()
unsigned long slot;
pass_info p(XCA_TITLE,
pki_scard::tr("Please enter the SO PIN (PUK) of the token: ") +
getIntName());
pki_scard::tr("Please enter the SO PIN (PUK) of the token '%1'").
arg(getIntName()));
p.setPin();
if (!prepare_card(&slot))
@ -676,7 +675,7 @@ void pki_scard::initPin()
p11.login((unsigned char*)soPin, soPinLen, true);
}
p.setDescription(qApp->translate("MainWindow",
"Please enter the new Pin for the token: ") +getIntName());
"Please enter the new Pin for the token '%1'").arg(getIntName()));
int newPinLen = MainWindow::passWrite(newPin, MAX_PASS_LENGTH, 0, &p);
if (newPinLen != -1) {
@ -691,8 +690,8 @@ void pki_scard::changeSoPin()
unsigned long slot;
pass_info p(XCA_TITLE,
pki_scard::tr("Please enter the SO PIN (PUK) of the token: ") +
getIntName());
pki_scard::tr("Please enter the SO PIN (PUK) of the token '%1'").
arg(getIntName()));
p.setPin();
if (!prepare_card(&slot))
@ -705,8 +704,9 @@ void pki_scard::changeSoPin()
p11.logout();
p11.login((unsigned char*)oldPin, oldPinLen, true);
p.setDescription(qApp->translate("MainWindow",
"Please enter the new SO Pin for the token: ") +getIntName());
p.setDescription(QObject::tr(
"Please enter the new SO Pin for the token: '%1'").
arg(getIntName()));
int newPinLen = MainWindow::passWrite(newPin, MAX_PASS_LENGTH, 0, &p);
if (newPinLen == -1) {

View File

@ -397,7 +397,8 @@ void pki_temp::fload(QString fname)
return;
}
if (fread(buf, 2*sizeof(int), 1, fp) != 1)
my_error(tr("Template file content error (too small) ") +fname);
my_error(tr("Template file content error (too small): %1").
arg(fname));
size = db::intFromData(&p1);
version = db::intFromData(&p1);
@ -407,7 +408,7 @@ void pki_temp::fload(QString fname)
size = intFromData(&p1);
if (size > 65535 || size <0) {
fclose(fp);
my_error(tr("Template file content error (bad size) ") +fname);
my_error(tr("Template file content error (bad size): %1").arg(fname));
}
oldimport = true;
} else {
@ -418,7 +419,7 @@ void pki_temp::fload(QString fname)
if ((s=fread(p, 1, size, fp)) != size) {
OPENSSL_free(p);
fclose(fp);
my_error(tr("Template file content error (bad length) ") + fname);
my_error(tr("Template file content error (bad length) :%1").arg(fname));
}
}
if (oldimport) {

View File

@ -294,7 +294,7 @@ void pki_x509::deleteFromToken()
QStringList info = p11.tokenInfo(slot);
if (QMessageBox::question(NULL, XCA_TITLE,
tr("Delete the certificate '%1' from the token '%1 (#%2)' ?").
tr("Delete the certificate '%1' from the token '%2 (#%3)' ?").
arg(getIntName()).arg(info[0]).arg(info[2]),
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes)
{
@ -590,24 +590,6 @@ int pki_x509::checkDate()
return ret;
}
int pki_x509::resetTimes(pki_x509 *signer)
{
int ret = 0;
if (!signer) return -1;
if (getNotAfter() > signer->getNotAfter()) {
// client cert is longer valid....
setNotAfter(signer->getNotAfter());
ret=1;
}
if (getNotBefore() < signer->getNotBefore()) {
// client cert is longer valid....
setNotBefore(signer->getNotBefore());
ret=2;
}
openssl_error();
return ret;
}
extList pki_x509::getV3ext()
{
extList el;
@ -711,20 +693,6 @@ int pki_x509::calcEffTrust()
return mytrust;
}
a1int pki_x509::getIncCaSerial() { return caSerial++; }
a1int pki_x509::getCaSerial() { return caSerial; }
void pki_x509::setCaSerial(a1int s) { caSerial = s; }
int pki_x509::getCrlDays() {return crlDays;}
void pki_x509::setCrlDays(int s){if (s>0) crlDays = s;}
QString pki_x509::getTemplate(){ return caTemplate; }
void pki_x509::setTemplate(QString s) {if (s.length()>0) caTemplate = s; }
void pki_x509::setCrlExpiry(const a1time &time)
{
crlExpiry = time;
@ -759,7 +727,8 @@ QVariant pki_x509::column_data(int col)
if (isRevoked())
return QVariant(getRevoked().toSortable());
else if (canSign())
return QVariant(tr("CRL expires: ")+ crlExpiry.toSortable());
return QVariant(tr("CRL expires: %1").
arg(crlExpiry.toSortable()));
}
return QVariant();

View File

@ -77,7 +77,10 @@ class pki_x509 : public pki_x509super
int checkDate();
void addV3ext(const x509v3ext &e);
void sign(pki_key *signkey, const EVP_MD *digest);
X509 *getCert(){ return cert;}
X509 *getCert()
{
return cert;
}
int getTrust();
void setTrust(int t);
int getEffTrust();
@ -87,15 +90,37 @@ class pki_x509 : public pki_x509super
a1time &getRevoked();
bool isRevoked();
int calcEffTrust();
a1int getIncCaSerial();
a1int getCaSerial();
void setCaSerial(a1int s);
void setTemplate(QString s);
QString getTemplate();
void setCrlDays(int s);
int getCrlDays();
a1int getIncCaSerial()
{
return caSerial++;
}
a1int getCaSerial()
{
return caSerial;
}
void setCaSerial(a1int s)
{
caSerial = s;
}
void setTemplate(QString s)
{
if (s.length() > 0)
caTemplate = s;
}
QString getTemplate()
{
return caTemplate;
}
void setCrlDays(int s)
{
if (s > 0)
crlDays = s;
}
int getCrlDays()
{
return crlDays;
}
void setCrlExpiry(const a1time &time);
int resetTimes(pki_x509 *signer);
bool hasExtension(int nid);
bool cmpIssuerAndSerial(pki_x509 *refcert);
void updateView();

View File

@ -1,10 +1,8 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CaProperties</class>
<widget class="QDialog" name="CaProperties" >
<property name="geometry" >
<widget class="QDialog" name="CaProperties">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -12,33 +10,30 @@
<height>375</height>
</rect>
</property>
<property name="windowTitle" >
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -47,27 +42,27 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<widget class="QLabel" name="image">
<property name="minimumSize">
<size>
<width>200</width>
<height>94</height>
</size>
</property>
<property name="scaledContents" >
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -79,10 +74,10 @@
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -91,8 +86,8 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="certName" >
<property name="font" >
<widget class="QLabel" name="certName">
<property name="font">
<font>
<family>Arial</family>
<pointsize>14</pointsize>
@ -103,17 +98,14 @@
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -122,43 +114,43 @@
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>CA properties</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<layout class="QGridLayout">
<property name="margin">
<number>9</number>
</property>
<property name="spacing" >
<property name="spacing">
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QLineEdit" name="serial" />
<item row="0" column="1">
<widget class="QLineEdit" name="serial"/>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label_3" >
<property name="text" >
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Next serial for signing</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QSpinBox" name="days" />
<item row="1" column="1">
<widget class="QSpinBox" name="days"/>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Days until next CRL issuing</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QComboBox" name="temp" />
<item row="2" column="1">
<widget class="QComboBox" name="temp"/>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Default template</string>
</property>
</widget>
@ -168,10 +160,10 @@
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@ -180,19 +172,19 @@
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>131</width>
<height>31</height>
@ -201,15 +193,15 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton" >
<property name="text" >
<widget class="QPushButton" name="okButton">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton" >
<property name="text" >
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
@ -218,7 +210,6 @@
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections>
<connection>
@ -227,11 +218,11 @@
<receiver>CaProperties</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>278</x>
<y>253</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>96</x>
<y>254</y>
</hint>
@ -243,11 +234,11 @@
<receiver>CaProperties</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>369</x>
<y>253</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>179</x>
<y>282</y>
</hint>

View File

@ -1,116 +1,95 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CertExtend</class>
<widget class="QDialog" name="CertExtend" >
<property name="geometry" >
<widget class="QDialog" name="CertExtend">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>450</width>
<height>335</height>
<width>512</width>
<height>275</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>8</number>
</property>
<property name="topMargin" >
<number>8</number>
</property>
<property name="rightMargin" >
<number>8</number>
</property>
<property name="bottomMargin" >
<number>8</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
<widget class="QLabel" name="capt">
<property name="font">
<font>
<family>Arial</family>
<pointsize>14</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>94</height>
</size>
</property>
<property name="scaledContents" >
<bool>true</bool>
<property name="text">
<string>Certificate renewal</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<width>78</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image">
<property name="minimumSize">
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="TextLabel1" >
<property name="text" >
<widget class="QLabel" name="TextLabel1">
<property name="text">
<string>This will create a new certificate as a copy of the old one with a new serial number and adjusted validity values.</string>
</property>
<property name="wordWrap" >
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>368</width>
<height>16</height>
@ -119,102 +98,72 @@
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Validity</string>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin" >
<number>8</number>
</property>
<property name="topMargin" >
<number>8</number>
</property>
<property name="rightMargin" >
<number>8</number>
</property>
<property name="bottomMargin" >
<property name="margin">
<number>8</number>
</property>
<item>
<layout class="QGridLayout" >
<property name="leftMargin" >
<layout class="QGridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing">
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="TextLabel1_2" >
<property name="text" >
<item row="0" column="0">
<widget class="QLabel" name="TextLabel1_2">
<property name="text">
<string>Not before</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="TextLabel2_4" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="TextLabel2_4">
<property name="text">
<string>Not after</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="Validity" native="1" name="notBefore" >
<property name="displayFormat" >
<string>yyyy-MM-dd hh:mm</string>
</property>
<property name="calendarPopup" >
<bool>true</bool>
</property>
<property name="timeSpec" >
<enum>Qt::UTC</enum>
</property>
</widget>
<item row="0" column="1">
<widget class="Validity" name="notBefore">
<property name="displayFormat">
<string>yyyy-MM-dd hh:mm</string>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="Validity" native="1" name="notAfter">
<property name="displayFormat" >
<string>yyyy-MM-dd hh:mm</string>
</property>
<property name="calendarPopup" >
<bool>true</bool>
</property>
<property name="timeSpec" >
<enum>Qt::UTC</enum>
</property>
</widget>
<item row="1" column="1">
<widget class="Validity" name="notAfter">
<property name="displayFormat">
<string>yyyy-MM-dd hh:mm</string>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
</widget>
</item>
</layout>
</item>
@ -222,68 +171,51 @@
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Time range</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>8</number>
</property>
<property name="topMargin" >
<number>8</number>
</property>
<property name="rightMargin" >
<number>8</number>
</property>
<property name="bottomMargin" >
<number>8</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QComboBox" name="validRange" >
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLineEdit" name="validNumber"/>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="validRange">
<item>
<property name="text" >
<property name="text">
<string>Days</string>
</property>
</item>
<item>
<property name="text" >
<property name="text">
<string>Months</string>
</property>
</item>
<item>
<property name="text" >
<property name="text">
<string>Years</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="midnightCB" >
<property name="text" >
<item row="0" column="2">
<widget class="QPushButton" name="applyTime">
<property name="text">
<string>Apply</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="midnightCB">
<property name="text">
<string>Midnight</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLineEdit" name="validNumber" />
</item>
<item row="1" column="1" >
<widget class="QPushButton" name="applyTime" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Apply</string>
<item row="1" column="1" colspan="2">
<widget class="QCheckBox" name="noWellDefinedExpDate">
<property name="text">
<string>No well-defined expiration</string>
</property>
</widget>
</item>
@ -294,13 +226,13 @@
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>368</width>
<height>16</height>
@ -309,47 +241,32 @@
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="PushButton3" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<widget class="QPushButton" name="PushButton3">
<property name="text">
<string>&amp;Cancel</string>
</property>
<property name="shortcut" >
<property name="shortcut">
<number>276824131</number>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -358,14 +275,8 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton2" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font" >
<widget class="QPushButton" name="PushButton2">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
@ -376,7 +287,7 @@
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<property name="text">
<string>&amp;OK</string>
</property>
</widget>
@ -409,13 +320,13 @@
<receiver>CertExtend</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>322</x>
<y>307</y>
<hint type="sourcelabel">
<x>501</x>
<y>264</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>222</x>
<y>302</y>
<y>274</y>
</hint>
</hints>
</connection>
@ -425,13 +336,13 @@
<receiver>CertExtend</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>112</x>
<y>302</y>
<hint type="sourcelabel">
<x>89</x>
<y>264</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>158</x>
<y>299</y>
<y>274</y>
</hint>
</hints>
</connection>
@ -441,13 +352,45 @@
<receiver>CertExtend</receiver>
<slot>applyTimeDiff()</slot>
<hints>
<hint type="sourcelabel" >
<x>306</x>
<y>249</y>
<hint type="sourcelabel">
<x>490</x>
<y>167</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>380</x>
<y>281</y>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>noWellDefinedExpDate</sender>
<signal>clicked(bool)</signal>
<receiver>notAfter</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>372</x>
<y>182</y>
</hint>
<hint type="destinationlabel">
<x>151</x>
<y>189</y>
</hint>
</hints>
</connection>
<connection>
<sender>noWellDefinedExpDate</sender>
<signal>clicked(bool)</signal>
<receiver>notAfter</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>407</x>
<y>185</y>
</hint>
<hint type="destinationlabel">
<x>188</x>
<y>188</y>
</hint>
</hints>
</connection>

View File

@ -1,7 +1,8 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CrlDetail</class>
<widget class="QDialog" name="CrlDetail" >
<property name="geometry" >
<widget class="QDialog" name="CrlDetail">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -9,27 +10,24 @@
<height>352</height>
</rect>
</property>
<property name="windowTitle" >
<string>CrlDetail_UI</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>8</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="TextLabel1" >
<property name="font" >
<widget class="QLabel" name="TextLabel1">
<property name="font">
<font>
<family>Arial</family>
<pointsize>14</pointsize>
@ -40,20 +38,20 @@
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<property name="text">
<string>Details of the Revocation list</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -62,20 +60,20 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<widget class="QLabel" name="image">
<property name="minimumSize">
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="scaledContents" >
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
@ -83,30 +81,30 @@
</layout>
</item>
<item>
<widget class="QTabWidget" name="tabview" >
<property name="currentIndex" >
<number>0</number>
<widget class="QTabWidget" name="tabview">
<property name="currentIndex">
<number>3</number>
</property>
<widget class="QWidget" name="unnamed" >
<attribute name="title" >
<widget class="QWidget" name="unnamed">
<attribute name="title">
<string>&amp;Status</string>
</attribute>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>8</number>
</property>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -115,142 +113,138 @@
</spacer>
</item>
<item>
<widget class="QFrame" name="frame" >
<property name="frameShape" >
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<layout class="QGridLayout">
<property name="margin">
<number>8</number>
</property>
<property name="spacing" >
<property name="spacing">
<number>6</number>
</property>
<item row="2" column="1" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<item row="2" column="1">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="ClickLabel" name="signCheck" />
<widget class="ClickLabel" name="signCheck"/>
</item>
<item>
<widget class="QLabel" name="TextLabel1_3" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>1</vsizetype>
<widget class="QLabel" name="TextLabel1_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="version" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<widget class="QLabel" name="version">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="TextLabel6" >
<property name="text" >
<item row="2" column="0">
<widget class="QLabel" name="TextLabel6">
<property name="text">
<string>Signature</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="TextLabel4" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="TextLabel4">
<property name="text">
<string>Signed by</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="TextLabel2" >
<property name="text" >
<item row="0" column="0">
<widget class="QLabel" name="TextLabel2">
<property name="text">
<string>Name</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="descr" >
<property name="toolTip" >
<item row="0" column="1">
<widget class="QLineEdit" name="descr">
<property name="toolTip">
<string>The internal name of the CRL in the database</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="ClickLabel" name="issuerIntName" />
<item row="1" column="1">
<widget class="ClickLabel" name="issuerIntName"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>issuing dates</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<layout class="QGridLayout">
<property name="margin">
<number>8</number>
</property>
<property name="spacing" >
<property name="spacing">
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="TextLabel2_2" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="TextLabel2_2">
<property name="text">
<string>Next Update</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="TextLabel1_2" >
<property name="text" >
<item row="0" column="0">
<widget class="QLabel" name="TextLabel1_2">
<property name="text">
<string>Last Update</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="CopyLabel" name="nUpdate" >
<property name="frameShape" >
<item row="1" column="1">
<widget class="CopyLabel" name="nUpdate">
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="CopyLabel" name="lUpdate" >
<property name="frameShape" >
<item row="0" column="1">
<widget class="CopyLabel" name="lUpdate">
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
</widget>
@ -260,13 +254,13 @@
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -276,88 +270,75 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="Widget9" >
<attribute name="title" >
<widget class="QWidget" name="Widget9">
<attribute name="title">
<string>&amp;Issuer</string>
</attribute>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>11</number>
</property>
<item>
<widget class="DistName" native="1" name="issuer" />
<widget class="DistName" name="issuer" native="true"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="unnamed_1" >
<attribute name="title" >
<widget class="QWidget" name="unnamed_1">
<attribute name="title">
<string>&amp;Extensions</string>
</attribute>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>11</number>
</property>
<item>
<widget class="QTextEdit" name="v3extensions" >
<property name="acceptDrops" >
<widget class="QTextEdit" name="v3extensions">
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="readOnly" >
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab" >
<attribute name="title" >
<widget class="QWidget" name="tab">
<attribute name="title">
<string>&amp;Revocation list</string>
</attribute>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>11</number>
</property>
<item>
<widget class="QTreeWidget" name="certList" >
<property name="alternatingRowColors" >
<widget class="QTreeWidget" name="certList">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode" >
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="rootIsDecorated" >
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="uniformRowHeights" >
<property name="uniformRowHeights">
<bool>true</bool>
</property>
<property name="columnCount" >
<number>3</number>
</property>
<column>
<property name="text" >
<property name="text">
<string>0</string>
</property>
</column>
<column>
<property name="text" >
<string>1</string>
</property>
</column>
<column>
<property name="text" >
<string>2</string>
</property>
</column>
</widget>
</item>
</layout>
@ -365,22 +346,22 @@
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>81</width>
<height>40</height>
@ -389,26 +370,24 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="but_ok" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>0</vsizetype>
<widget class="QPushButton" name="but_ok">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>&amp;OK</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@ -419,8 +398,8 @@
</layout>
</item>
</layout>
<widget class="QWidget" native="1" name="widget" >
<property name="geometry" >
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -431,11 +410,6 @@
</widget>
</widget>
<customwidgets>
<customwidget>
<class>CopyLabel</class>
<extends>QLabel</extends>
<header>widgets/clicklabel.h</header>
</customwidget>
<customwidget>
<class>ClickLabel</class>
<extends>QLabel</extends>
@ -447,6 +421,11 @@
<header>widgets/distname.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>CopyLabel</class>
<extends>QLabel</extends>
<header>widgets/clicklabel.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
@ -456,11 +435,11 @@
<receiver>CrlDetail</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>367</x>
<y>452</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>520</x>
<y>428</y>
</hint>

View File

@ -42,10 +42,7 @@
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Export&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Export</string>
</property>
</widget>
</item>

View File

@ -10,9 +10,6 @@
<height>404</height>
</rect>
</property>
<property name="windowTitle">
<string>ExportKey</string>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>

View File

@ -1,10 +1,8 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ImportMulti</class>
<widget class="QDialog" name="ImportMulti" >
<property name="geometry" >
<widget class="QDialog" name="ImportMulti">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -12,78 +10,75 @@
<height>362</height>
</rect>
</property>
<property name="windowTitle" >
<string>ImportMulti_UI</string>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QListView" name="listView" />
<widget class="QListView" name="listView"/>
</item>
<item>
<widget class="QFrame" name="frame" >
<property name="frameShape" >
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QPushButton" name="butOk" >
<property name="text" >
<widget class="QPushButton" name="butOk">
<property name="text">
<string>Import &amp;All</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butImport" >
<property name="text" >
<widget class="QPushButton" name="butImport">
<property name="text">
<string>&amp;Import</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butCancel" >
<property name="text" >
<widget class="QPushButton" name="butCancel">
<property name="text">
<string>&amp;Done</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butRemove" >
<property name="text" >
<widget class="QPushButton" name="butRemove">
<property name="text">
<string>&amp;Remove</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butDetails" >
<property name="text" >
<widget class="QPushButton" name="butDetails">
<property name="text">
<string>Details</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>204</width>
<height>21</height>
@ -92,14 +87,14 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<widget class="QLabel" name="image">
<property name="minimumSize">
<size>
<width>200</width>
<height>94</height>
</size>
</property>
<property name="scaledContents" >
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
@ -109,7 +104,6 @@
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections>
<connection>
@ -118,11 +112,11 @@
<receiver>ImportMulti</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>373</x>
<y>131</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>287</x>
<y>358</y>
</hint>

View File

@ -10,9 +10,6 @@
<height>428</height>
</rect>
</property>
<property name="windowTitle">
<string>KeyDetail</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QWidget" name="widget" native="true"/>
@ -335,12 +332,12 @@
</widget>
<customwidgets>
<customwidget>
<class>CopyLabel</class>
<class>ClickLabel</class>
<extends>QLabel</extends>
<header>widgets/clicklabel.h</header>
</customwidget>
<customwidget>
<class>ClickLabel</class>
<class>CopyLabel</class>
<extends>QLabel</extends>
<header>widgets/clicklabel.h</header>
</customwidget>

View File

@ -10,9 +10,6 @@
<height>511</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout">
<property name="spacing">

View File

@ -1,35 +1,33 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>NewCrl</class>
<widget class="QDialog" name="NewCrl" >
<property name="geometry" >
<widget class="QDialog" name="NewCrl">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>316</width>
<height>354</height>
<width>358</width>
<height>325</height>
</rect>
</property>
<property name="windowTitle" >
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="TextLabel1" >
<property name="font" >
<widget class="QLabel" name="TextLabel1">
<property name="font">
<font>
<family>Arial</family>
<pointsize>14</pointsize>
@ -40,17 +38,17 @@
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<property name="text">
<string>Create CRL</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@ -59,20 +57,20 @@
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<widget class="QLabel" name="image">
<property name="minimumSize">
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize" >
<property name="maximumSize">
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="scaledContents" >
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
@ -81,10 +79,10 @@
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@ -93,102 +91,102 @@
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Dates</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<layout class="QGridLayout">
<property name="margin">
<number>9</number>
</property>
<property name="spacing" >
<property name="spacing">
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>next update</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>last update</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="Validity" native="1" name="lastUpdate" >
<property name="displayFormat" >
<string>yyyy-MM-dd hh:mm</string>
</property>
<property name="calendarPopup" >
<bool>true</bool>
</property>
<property name="timeSpec" >
<enum>Qt::UTC</enum>
</property>
</widget>
<item row="0" column="1">
<widget class="Validity" name="lastUpdate">
<property name="displayFormat">
<string>yyyy-MM-dd hh:mm</string>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="Validity" native="1" name="nextUpdate">
<property name="displayFormat" >
<string>yyyy-MM-dd hh:mm</string>
</property>
<property name="calendarPopup" >
<bool>true</bool>
</property>
<property name="timeSpec" >
<enum>Qt::UTC</enum>
</property>
</widget>
<item row="1" column="1">
<widget class="Validity" name="nextUpdate">
<property name="displayFormat">
<string>yyyy-MM-dd hh:mm</string>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_3" >
<property name="text" >
<widget class="QLabel" name="label_3">
<property name="text">
<string>Hashing algorithm</string>
</property>
</widget>
</item>
<item>
<widget class="hashBox" name="hashAlgo" />
<widget class="hashBox" name="hashAlgo"/>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Extensions</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QCheckBox" name="authKeyId" >
<property name="text" >
<widget class="QCheckBox" name="authKeyId">
<property name="text">
<string>Authority key identifier</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="subAltName" >
<property name="text" >
<widget class="QCheckBox" name="subAltName">
<property name="text">
<string>Subject alternative name</string>
</property>
</widget>
@ -198,10 +196,10 @@
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>21</width>
<height>20</height>
@ -210,26 +208,26 @@
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="cancelButton" >
<property name="text" >
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>21</width>
<height>21</height>
@ -238,8 +236,8 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="okButton" >
<property name="text" >
<widget class="QPushButton" name="okButton">
<property name="text">
<string>OK</string>
</property>
</widget>
@ -249,17 +247,17 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>hashBox</class>
<extends>QComboBox</extends>
<header>widgets/hashBox.h</header>
</customwidget>
<customwidget>
<class>Validity</class>
<extends>QDateTimeEdit</extends>
<header>widgets/validity.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>hashBox</class>
<extends>QComboBox</extends>
<header>widgets/hashBox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>hashAlgo</tabstop>
@ -276,11 +274,11 @@
<receiver>NewCrl</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>224</x>
<y>332</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>96</x>
<y>254</y>
</hint>
@ -292,11 +290,11 @@
<receiver>NewCrl</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>305</x>
<y>332</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>179</x>
<y>282</y>
</hint>

View File

@ -2,17 +2,6 @@
<ui version="4.0">
<class>NewX509</class>
<widget class="QDialog" name="NewX509">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>553</width>
<height>599</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout">
@ -428,12 +417,9 @@ If this list is disabled, you only can create a self-signed certificate.</string
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="TextLabel4_2_2_2">
<property name="toolTip">
<string>O</string>
</property>
<property name="text">
<string>Organisation</string>
<widget class="QLabel" name="LorganisationName">
<property name="buddy">
<cstring>organisationName</cstring>
</property>
</widget>
</item>
@ -465,22 +451,16 @@ If this list is disabled, you only can create a self-signed certificate.</string
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="TextLabel2_2_2">
<property name="toolTip">
<string>C</string>
</property>
<property name="text">
<string>Country code</string>
<widget class="QLabel" name="LcountryName">
<property name="buddy">
<cstring>countryName</cstring>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="TextLabel3_2_3">
<property name="toolTip">
<string>ST</string>
</property>
<property name="text">
<string>State or Province</string>
<widget class="QLabel" name="LstateOrProvinceName">
<property name="buddy">
<cstring>stateOrProvinceName</cstring>
</property>
</widget>
</item>
@ -488,42 +468,23 @@ If this list is disabled, you only can create a self-signed certificate.</string
<widget class="QLineEdit" name="stateOrProvinceName"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="TextLabel4_3_2">
<property name="toolTip">
<string>L</string>
</property>
<property name="text">
<string>Locality</string>
<widget class="QLabel" name="LlocalityName">
<property name="buddy">
<cstring>localityName</cstring>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="TextLabel5_2_2">
<property name="toolTip">
<string>OU</string>
</property>
<property name="text">
<string>Organ. unit</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="TextLabel6_2_2">
<property name="toolTip">
<string>CN</string>
</property>
<property name="text">
<string>Common name</string>
<widget class="QLabel" name="LorganisationalUnitName">
<property name="buddy">
<cstring>organisationalUnitName</cstring>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="TextLabel7_2_2">
<property name="toolTip">
<string>emailAddress</string>
</property>
<property name="text">
<string>E-Mail address</string>
<widget class="QLabel" name="LemailAddress">
<property name="buddy">
<cstring>emailAddress</cstring>
</property>
</widget>
</item>
@ -538,11 +499,21 @@ If this list is disabled, you only can create a self-signed certificate.</string
<property name="text">
<string>Internal name</string>
</property>
<property name="buddy">
<cstring>description</cstring>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLineEdit" name="organisationName"/>
</item>
<item row="2" column="2">
<widget class="QLabel" name="LcommonName">
<property name="buddy">
<cstring>commonName</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -600,6 +571,24 @@ If this list is disabled, you only can create a self-signed certificate.</string
<property name="columnCount">
<number>0</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
@ -820,7 +809,7 @@ It also copies the issuer and serial number from the issuer certificate. Normall
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>-1</number>
<number>6</number>
</property>
<property name="margin">
<number>0</number>
@ -1321,9 +1310,6 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld</string>
<height>107</height>
</size>
</property>
<property name="toolTip">
<string>Great picture , heh ?</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
@ -1515,7 +1501,7 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld</string>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -1541,7 +1527,7 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld</string>
<item>
<widget class="QPushButton" name="okButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -1637,8 +1623,8 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld</string>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>96</x>
<y>569</y>
<x>89</x>
<y>518</y>
</hint>
<hint type="destinationlabel">
<x>179</x>
@ -1646,5 +1632,53 @@ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld</string>
</hint>
</hints>
</connection>
<connection>
<sender>okButton</sender>
<signal>clicked()</signal>
<receiver>NewX509</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>771</x>
<y>520</y>
</hint>
<hint type="destinationlabel">
<x>304</x>
<y>543</y>
</hint>
</hints>
</connection>
<connection>
<sender>selfSignRB</sender>
<signal>clicked(bool)</signal>
<receiver>serialNr</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>268</x>
<y>289</y>
</hint>
<hint type="destinationlabel">
<x>324</x>
<y>287</y>
</hint>
</hints>
</connection>
<connection>
<sender>noWellDefinedExpDate</sender>
<signal>clicked(bool)</signal>
<receiver>notAfter</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>656</x>
<y>298</y>
</hint>
<hint type="destinationlabel">
<x>162</x>
<y>302</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -10,9 +10,6 @@
<height>398</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="TextLabel1">
@ -28,10 +25,7 @@
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;XCA Options&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>XCA Options</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -180,6 +174,12 @@ p, li { white-space: pre-wrap; }
</item>
<item>
<widget class="QPushButton" name="tryLoadButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Load</string>
</property>

View File

@ -1,7 +1,8 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>v3ext</class>
<widget class="QDialog" name="v3ext" >
<property name="geometry" >
<widget class="QDialog" name="v3ext">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@ -9,96 +10,90 @@
<height>232</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form1</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>8</number>
</property>
<item>
<widget class="QWidget" native="1" name="widget" />
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="type" />
<widget class="QComboBox" name="type"/>
</item>
<item>
<widget class="QLineEdit" name="value" />
<widget class="QLineEdit" name="value"/>
</item>
</layout>
</item>
<item>
<widget class="QWidget" native="1" name="widget_2" />
</item>
<item>
<widget class="QWidget" native="1" name="widget_3" />
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QTableWidget" name="tableWidget" >
<property name="alternatingRowColors" >
<widget class="QTableWidget" name="tableWidget">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode" >
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior" >
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="gridStyle" >
<property name="gridStyle">
<enum>Qt::DotLine</enum>
</property>
<property name="columnCount" >
<property name="columnCount">
<number>0</number>
</property>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
</widget>
</item>
<item>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="addEntry" >
<property name="text" >
<widget class="QPushButton" name="addEntry">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="delEntry" >
<property name="text" >
<widget class="QPushButton" name="delEntry">
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@ -111,36 +106,36 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="apply" >
<property name="text" >
<widget class="QPushButton" name="apply">
<property name="text">
<string>Apply</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="validate" >
<property name="text" >
<widget class="QPushButton" name="validate">
<property name="text">
<string>Validate</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -149,16 +144,14 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="cancel" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<widget class="QPushButton" name="cancel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<property name="text">
<string>Cancel</string>
</property>
</widget>
@ -175,11 +168,11 @@
<receiver>v3ext</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>413</x>
<y>187</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>227</x>
<y>150</y>
</hint>

View File

@ -112,6 +112,6 @@ void CertDetail::setCert(pki_x509 *cert)
cert->openssl_error();
} catch (errorEx &err) {
QMessageBox::warning(this, tr(XCA_TITLE), err.getString());
QMessageBox::warning(this, XCA_TITLE, err.getString());
}
}

View File

@ -16,9 +16,10 @@
#include <qlineedit.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <qmessagebox.h>
CertExtend::CertExtend(QWidget *parent)
CertExtend::CertExtend(QWidget *parent, pki_x509 *s)
:QDialog(parent)
{
setupUi(this);
@ -28,6 +29,7 @@ CertExtend::CertExtend(QWidget *parent)
validNumber->setText("1");
validRange->setCurrentIndex(2);
applyTimeDiff();
signer = s;
}
void CertExtend::applyTimeDiff()
@ -35,3 +37,53 @@ void CertExtend::applyTimeDiff()
applyTD(this, validNumber->text().toInt(), validRange->currentIndex(),
midnightCB->isChecked(), notBefore, notAfter);
}
void CertExtend::accept()
{
if (notBefore->getDate() < signer->getNotBefore()) {
QString text = tr("The certificate will be earlier valid than the signer. This is probably not what you want.");
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
text, QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Edit times"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout"));
msg.addButton(QMessageBox::Yes)->setText(tr("Adjust date and continue"));
switch (msg.exec())
{
case QMessageBox::Ok:
case QMessageBox::Cancel:
return;
case QMessageBox::Close:
reject();
return;
case QMessageBox::Apply:
break;
case QMessageBox::Yes:
notBefore->setDate(signer->getNotBefore());
}
}
if (notAfter->getDate() > signer->getNotAfter() &&
!noWellDefinedExpDate->isChecked()) {
QString text = tr("The certificate will be longer valid than the signer. This is probably not what you want.");
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
text, QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Edit times"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout"));
msg.addButton(QMessageBox::Yes)->setText(tr("Adjust date and continue"));
switch (msg.exec())
{
case QMessageBox::Ok:
case QMessageBox::Cancel:
return;
case QMessageBox::Close:
reject();
return;
case QMessageBox::Apply:
break;
case QMessageBox::Yes:
notAfter->setDate(signer->getNotAfter());
}
}
QDialog::accept();
}

View File

@ -9,6 +9,7 @@
#define __CERTEXTEND_H
#include "ui_CertExtend.h"
#include "lib/pki_x509.h"
class pki_key;
@ -16,10 +17,13 @@ class CertExtend: public QDialog, public Ui::CertExtend
{
Q_OBJECT
pki_x509 *signer;
public:
CertExtend(QWidget *parent);
CertExtend(QWidget *parent, pki_x509 *s);
public slots:
void applyTimeDiff();
void accept();
};
#endif

View File

@ -76,6 +76,7 @@ void CrlDetail::setCrl(pki_crl *crl)
QTreeWidgetItem *current;
revit = crl->getRev(i);
rev = mw->certs->getByIssSerial(iss, revit.getSerial());
certList->setColumnCount(3);
current = new QTreeWidgetItem(certList);
if (rev != NULL) {
current->setText(0, rev->getIntName() );

View File

@ -76,7 +76,8 @@ void ImportMulti::addItem(pki_base *pki)
}
else {
QMessageBox::warning(this, XCA_TITLE,
tr("The type of the Item is not recognized: ") + cn, tr("OK"));
tr("The type of the Item '%1' is not recognized").
arg(cn));
}
}
@ -151,7 +152,8 @@ void ImportMulti::import(QModelIndex &idx)
MainWindow::temps->insert(pki);
} else {
QMessageBox::warning(this, XCA_TITLE,
tr("The type of the Item is not recognized: ") + cn, tr("OK"));
tr("The type of the Item '%1' is not recognized").
arg(cn));
delete pki;
}
}
@ -197,15 +199,17 @@ void ImportMulti::on_butDetails_clicked()
delete dlg;
} else if (cn == "pki_temp") {
QMessageBox::warning(this, XCA_TITLE,
tr("Details of this item cannot be shown: ") + cn, tr("OK"));
tr("Details of the item '%1' cannot be shown").
arg(cn));
} else
QMessageBox::warning(this, XCA_TITLE,
tr("The type of the Item is not recognized ") + cn, tr("OK"));
tr("The type of the item '%1' is not recognized").
arg(cn));
}
catch (errorEx &err) {
QMessageBox::warning(this, XCA_TITLE,
tr("Error") + pki->getClassName() +
err.getString(), tr("OK"));
err.getString());
}
}

View File

@ -37,7 +37,6 @@ static QString CurveComment(int nid)
void KeyDetail::setKey(pki_key *key)
{
int nid;
QString title = tr("Details of the ") +key->getTypeString() +tr(" key");
keyDesc->setText(key->getIntName());
keyLength->setText(key->length());
@ -45,8 +44,7 @@ void KeyDetail::setKey(pki_key *key)
keyPrivEx->disableToolTip();
if (!key->isToken())
cardBox->hide();
tlHeader->setText(tr("Details of the") + " " + key->getTypeString() +
" " + tr(" key"));
tlHeader->setText(tr("Details of the %1 key").arg(key->getTypeString()));
if (key->isPubKey()) {
keyPrivEx->setText(tr("Not available"));
@ -57,7 +55,7 @@ void KeyDetail::setKey(pki_key *key)
cardBox->setTitle(tr("Token") +" [" +card->getCardLabel() +"]");
cardManufacturer->setText(card->getManufacturer());
cardSerial->setText(card->getSerial());
keyPrivEx->setText(tr("via Security token; ID: ") +card->getId());
keyPrivEx->setText(tr("Security token ID:%1").arg(card->getId()));
keyBox->setTitle(tr("Key") + " [" + card->getLabel() + "]");
} else {
keyPrivEx->setText(tr("Available"));
@ -85,6 +83,6 @@ void KeyDetail::setKey(pki_key *key)
keyModulus->setText(key->ecPubKey());
break;
default:
tlHeader->setText(tr("UNKNOWN Key"));
tlHeader->setText(tr("Unknown key"));
}
}

View File

@ -286,7 +286,7 @@ void MainWindow::read_cmdline()
case 'v' : cmd_version(); opt=0; break;
case 'x' : exitApp = 1; opt=0; break;
case 'h' : cmd_help(NULL); opt=0; break;
default : cmd_help(CCHAR(tr("no such option: ") + arg));
default : cmd_help(CCHAR(tr("no such option: %1").arg(arg)));
}
if (arg[2] != '\0' && opt==1) {
arg+=2;
@ -314,7 +314,7 @@ void MainWindow::read_cmdline()
homedir = dbfile.left(dbfile.lastIndexOf(QDir::separator()));
init_database();
} else {
cmd_help(CCHAR(tr("Database file does not exist: ") + arg));
cmd_help(CCHAR(tr("Database file does not exist: '%1'").arg(arg)));
}
}
@ -779,7 +779,7 @@ int MainWindow::passWrite(char *buf, int size, int, void *userdata)
hexwarn);
} else {
QMessageBox::warning(p->getWidget(), XCA_TITLE,
p->getType() + tr(" missmatch"));
tr("%1 missmatch").arg(p->getType()));
}
}
delete dlg;
@ -791,9 +791,10 @@ void MainWindow::Error(errorEx &err)
if (err.isEmpty())
return;
QString msg = tr("The following error occured:") + "\n" + err.getString();
int ret = QMessageBox::warning(qApp->activeWindow(), XCA_TITLE,
msg, tr("&OK"), tr("Copy to Clipboard"));
if (ret == 1) {
QMessageBox box(QMessageBox::Warning, XCA_TITLE,
msg, QMessageBox::Ok, NULL);
box.addButton(QMessageBox::Apply)->setText(tr("Copy to Clipboard"));
if (box.exec() == QMessageBox::Apply) {
QClipboard *cb = QApplication::clipboard();
cb->setText(msg);
}

View File

@ -119,15 +119,16 @@ NewX509::NewX509(QWidget *parent)
X509V3_set_ctx(&ext_ctx, NULL , NULL, NULL, NULL, 0);
X509V3_set_ctx_nodb(&ext_ctx);
// setup the list of x509nameEntrys
name_ptr[0] = countryName;
name_ptr[1] = stateOrProvinceName;
name_ptr[2] = localityName;
name_ptr[3] = organisationName;
name_ptr[4] = organisationalUnitName;
name_ptr[5] = commonName;
name_ptr[6] = emailAddress;
QList<QLabel *> nameLabel;
nameLabel << LcountryName << LstateOrProvinceName << LlocalityName <<
LorganisationName << LorganisationalUnitName << LcommonName <<
LemailAddress;
for(int i=0; i<nameLabel.count(); i++) {
nameLabel[i]->setText(OBJ_nid2ln(name_nid[i]));
nameLabel[i]->setToolTip(OBJ_nid2sn(name_nid[i]));
name_ptr[i] = (QLineEdit *)nameLabel[i]->buddy();
}
// Setup Request Attributes
if (attrWidget->layout())
delete attrWidget->layout();
@ -509,11 +510,6 @@ void NewX509::on_foreignSignRB_toggled(bool checked)
certList->setEnabled(checked);
}
void NewX509::on_selfSignRB_toggled(bool checked)
{
serialNr->setEnabled(checked);
}
void NewX509::newKeyDone(QString name)
{
QStringList keys;
@ -531,11 +527,6 @@ void NewX509::newKeyDone(QString name)
keyList->setCurrentIndex(keys.indexOf(name));
}
void NewX509::on_noWellDefinedExpDate_toggled(bool)
{
notAfter->setEnabled(!noWellDefinedExpDate->isChecked());
}
void NewX509::on_usedKeysToo_toggled(bool)
{
QString cur = keyList->currentText();
@ -804,39 +795,43 @@ QString NewX509::mandatoryDnRemain()
return dnl.join(",");
}
void NewX509::on_okButton_clicked()
void NewX509::accept()
{
on_tabWidget_currentChanged(0);
int tabsub = tabWidget->count() != 5 ? 0 : 1;
on_tabWidget_currentChanged(0);
try {
getX509name(1);
} catch (errorEx &err) {
if (QMessageBox::warning(this, tr(XCA_TITLE), err.getString(),
tr("Ok"), tr("Abort rollout")) == 1)
{
tabWidget->setCurrentIndex(1);
QMessageBox msg(QMessageBox::Warning, XCA_TITLE, err.getString(),
QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok);
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
if (msg.exec() == QMessageBox::Close) {
reject();
}
return;
}
if (fromReqCB->isChecked()) {
if (!getSelectedReq()->verify()) {
if (QMessageBox::warning(this, tr(XCA_TITLE),
tr("The verification of the Certificate request failed.\n"
"The rollout should be aborted."),
tr("Continue anyway"), tr("Abort rollout")) == 1)
{
reject();
}
if (fromReqCB->isChecked() && !getSelectedReq()->verify()) {
tabWidget->setCurrentIndex(0);
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
tr("The verification of the Certificate request failed.\nThe rollout should be aborted."),
QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Continue anyway"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
if (msg.exec() == QMessageBox::Close) {
reject();
}
}
if (description->text().isEmpty() && !fromReqCB->isChecked()) {
if (commonName->text().isEmpty()) {
if (QMessageBox::warning(this, tr(XCA_TITLE),
tr("The internal name and the common name are empty.\n"
"Please set at least the internal name."),
tr("Ok"), tr("Abort rollout")) == 1)
{
tabWidget->setCurrentIndex(1);
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
tr("The internal name and the common name are empty.\nPlease set at least the internal name."), QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Edit name"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
if (msg.exec() == QMessageBox::Close) {
reject();
}
return;
@ -844,70 +839,130 @@ void NewX509::on_okButton_clicked()
description->setText(commonName->text());
}
}
if ( keyList->count() == 0 &&
keyList->isEnabled() &&
!fromReqCB->isChecked())
if ( keyList->count() == 0 && keyList->isEnabled() &&
!fromReqCB->isChecked())
{
if (QMessageBox::warning(this, tr(XCA_TITLE),
tr("There is no Key selected for signing."),
tr("Ok"), tr("Abort rollout")) == 1)
{
tabWidget->setCurrentIndex(1);
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
tr("There is no Key selected for signing."), QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Select key"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
if (msg.exec() == QMessageBox::Close) {
reject();
}
return;
}
QString unsetDN;
if (pt != tmpl)
unsetDN = mandatoryDnRemain();
if (!unsetDN.isEmpty())
{
switch (QMessageBox::warning(this, tr(XCA_TITLE),
tr("The following distinguished name entries are empty,\n"
"though you have declared them as mandatory "
"in the options menu:\n") + unsetDN,
tr("Ok"), tr("Abort rollout"),
tr("Continue rollout")))
if (!unsetDN.isEmpty()) {
tabWidget->setCurrentIndex(1);
QString text = tr("The following distinguished name entries are empty:\n%1\nthough you have declared them as mandatory in the options menu.").arg(unsetDN);
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
text, QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Edit subject"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout"));
switch (msg.exec())
{
case -1:
case 0:
case QMessageBox::Ok:
case QMessageBox::Cancel:
return;
case 1:
case QMessageBox::Close:
reject();
return;
case QMessageBox::Apply:
break;
}
}
if (notBefore->getDate() > notAfter->getDate() &&
!noWellDefinedExpDate->isChecked()) {
switch (QMessageBox::warning(this, tr(XCA_TITLE),
tr("The certificate will be out of date before it becomes valid. "
"You most probably mixed up both dates."),
tr("Ok"), tr("Abort rollout"), tr("Continue rollout")))
if (notBefore->getDate() > notAfter->getDate()) {
tabWidget->setCurrentIndex(2-tabsub);
QString text = tr("The certificate will be out of date before it becomes valid. You most probably mixed up both dates.");
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
text, QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Edit dates"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
msg.addButton(QMessageBox::Apply)->setText("Continue rollout");
switch (msg.exec())
{
case -1:
case 0:
case QMessageBox::Ok:
case QMessageBox::Cancel:
return;
case 1:
case QMessageBox::Close:
reject();
return;
case QMessageBox::Apply:
break;
}
}
pki_x509 *signer = getSelectedSigner();
if (notBefore->getDate() < signer->getNotBefore() && !selfSignRB->isChecked()) {
tabWidget->setCurrentIndex(2-tabsub);
QString text = tr("The certificate will be earlier valid than the signer. This is probably not what you want.");
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
text, QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Edit times"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout"));
msg.addButton(QMessageBox::Yes)->setText(tr("Adjust date and continue"));
switch (msg.exec())
{
case QMessageBox::Ok:
case QMessageBox::Cancel:
return;
case QMessageBox::Close:
reject();
return;
case QMessageBox::Apply:
break;
case QMessageBox::Yes:
notBefore->setDate(signer->getNotBefore());
}
}
if (notAfter->getDate() > signer->getNotAfter() &&
!noWellDefinedExpDate->isChecked() && !selfSignRB->isChecked()) {
tabWidget->setCurrentIndex(2-tabsub);
QString text = tr("The certificate will be longer valid than the signer. This is probably not what you want.");
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
text, QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Edit times"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout"));
msg.addButton(QMessageBox::Yes)->setText(tr("Adjust date and continue"));
switch (msg.exec())
{
case QMessageBox::Ok:
case QMessageBox::Cancel:
return;
case QMessageBox::Close:
reject();
return;
case QMessageBox::Apply:
break;
case QMessageBox::Yes:
notAfter->setDate(signer->getNotAfter());
}
}
on_adv_validate_clicked();
if (checkExtDuplicates()) {
switch (QMessageBox::warning(this, tr(XCA_TITLE),
tr("The certificate contains duplicated extensions. "
"Check the validation on the advanced tab."),
tr("Ok"), tr("Abort rollout"), tr("Continue rollout")))
tabWidget->setCurrentIndex(5-tabsub);
QString text = tr("The certificate contains duplicated extensions. Check the validation on the advanced tab.");
QMessageBox msg(QMessageBox::Warning, XCA_TITLE,
text, QMessageBox::NoButton, this);
msg.addButton(QMessageBox::Ok)->setText(tr("Edit extensions"));
msg.addButton(QMessageBox::Close)->setText(tr("Abort rollout"));
msg.addButton(QMessageBox::Apply)->setText(tr("Continue rollout"));
switch (msg.exec())
{
case -1:
case 0:
case QMessageBox::Ok:
case QMessageBox::Cancel:
return;
case 1:
case QMessageBox::Close:
reject();
return;
case QMessageBox::Apply:
break;
}
}
accept();
QDialog::accept();
}

View File

@ -102,17 +102,15 @@ class NewX509: public QDialog, public Ui::NewX509
void on_editCrlDist_clicked();
void on_editAuthInfAcc_clicked();
void on_foreignSignRB_toggled(bool checked);
void on_selfSignRB_toggled(bool checked);
void on_genKeyBut_clicked();
void on_showReqBut_clicked();
void on_certList_currentIndexChanged(int index);
void on_applyTemplate_clicked();
void on_okButton_clicked();
void on_adv_validate_clicked();
void on_usedKeysToo_toggled(bool checked);
void on_tabWidget_currentChanged(int idx);
void on_reqSubChange_clicked();
void on_noWellDefinedExpDate_toggled(bool);
void accept();
signals:
void genKey(QString);

View File

@ -223,8 +223,8 @@ extList NewX509::getAdvanced()
ERR_error_string(i ,NULL));
QMessageBox::warning(this, XCA_TITLE,
tr("Advanced Settings Error: ") +
ERR_error_string(i ,NULL), tr("OK"));
tr("Advanced Settings Error: %1").
arg(ERR_error_string(i ,NULL)));
BIO_free(bio);
return elist;
}

View File

@ -126,13 +126,14 @@ bool v3ext::__validate(bool showSuccess)
error += "\n";
}
if (! error.isEmpty()) {
QMessageBox::warning(this, XCA_TITLE, tr("Validation failed:")
+ "\n'" + str + "'\n" + error, tr("&OK"));
QMessageBox::warning(this, XCA_TITLE,
tr("Validation failed:\n'%1'").arg(str));
return false;
}
if (showSuccess) {
QMessageBox::information(this, XCA_TITLE,
tr("Validation successfull:\n'") + ext.getValue() + "'", tr("&OK"));
tr("Validation successfull:\n'%1'").
arg(ext.getValue()));
}
return true;
}

View File

@ -92,7 +92,8 @@ FORMS += ui/About.ui \
ui/PassWrite.ui \
ui/ReqDetail.ui \
ui/TrustState.ui \
ui/v3ext.ui
ui/v3ext.ui \
ui/SelectToken.ui
SOURCES += lib/asn1int.cpp \
lib/asn1time.cpp \
lib/db.cpp \