From 462eac83a3dda254b367e0549dbd2af0b200eee4 Mon Sep 17 00:00:00 2001 From: chris2511 Date: Sun, 12 Mar 2006 23:57:24 +0000 Subject: [PATCH] certificates for QT4 --- Makefile | 2 +- Rules.mak | 9 +- configure | 40 +- lib/db.cpp | 4 + lib/db_key.cpp | 2 +- lib/db_x509.cpp | 18 +- lib/db_x509.h | 7 +- lib/pki_x509.cpp | 51 +- lib/pki_x509.h | 2 + lib/x509name.cpp | 6 +- lib/x509rev.cpp | 8 + ui/About.ui | 302 ++- ui/CertDetail.ui | 2096 +++++++---------- ui/CertExtend.ui | 752 +++---- ui/CrlDetail.ui | 1509 ++++++------- ui/ExportCert.ui | 884 ++++---- ui/ExportKey.ui | 752 +++---- ui/ExportTinyCA.ui | 767 +++---- ui/Help.ui | 239 +- ui/ImportMulti.ui | 299 +-- ui/KeyDetail.ui | 776 +++---- ui/MainWindow.ui | 1379 +++++------- ui/NewKey.ui | 651 +++--- ui/NewX509.ui | 4609 ++++++++++++-------------------------- ui/PassRead.ui | 534 ++--- ui/PassWrite.ui | 601 +++-- ui/ReqDetail.ui | 1586 +++++-------- ui/TrustState.ui | 547 ++--- ui/v3ext.ui | 310 +-- view/CertView.cpp | 74 +- view/CertView.h | 6 +- view/CrlView.cpp | 36 +- view/CrlView.h | 8 +- view/KeyView.cpp | 38 +- view/KeyView.h | 4 +- view/ReqView.cpp | 40 +- view/ReqView.h | 4 +- view/TempView.cpp | 20 +- view/TempView.h | 12 +- view/XcaListView.cpp | 46 +- view/XcaListView.h | 20 +- widgets/CertDetail.cpp | 29 +- widgets/CertDetail.h | 15 +- widgets/CertExtend.cpp | 23 +- widgets/CertExtend.h | 7 +- widgets/CrlDetail.cpp | 16 +- widgets/CrlDetail.h | 2 +- widgets/ExportCert.cpp | 10 +- widgets/ExportKey.cpp | 82 +- widgets/ExportKey.h | 11 +- widgets/ExportTinyCA.cpp | 12 +- widgets/ImportMulti.cpp | 59 +- widgets/ImportMulti.h | 14 +- widgets/KeyDetail.cpp | 23 +- widgets/KeyDetail.h | 4 +- widgets/MW_database.cpp | 189 +- widgets/MW_help.cpp | 39 +- widgets/MW_menu.cpp | 54 +- widgets/MainWindow.cpp | 197 +- widgets/MainWindow.h | 59 +- widgets/Makefile | 8 +- widgets/NewX509.cpp | 295 +-- widgets/NewX509.h | 18 +- widgets/NewX509_ext.cpp | 62 +- widgets/ReqDetail.cpp | 25 +- widgets/ReqDetail.h | 12 +- widgets/XcaTreeView.cpp | 68 + widgets/XcaTreeView.h | 65 + widgets/clicklabel.cpp | 16 +- widgets/clicklabel.h | 4 +- widgets/distname.cpp | 41 +- widgets/distname.h | 17 +- widgets/v3ext.cpp | 63 +- widgets/v3ext.h | 14 +- widgets/validity.cpp | 100 +- widgets/validity.h | 25 +- xca.pro | 13 +- 77 files changed, 8374 insertions(+), 12367 deletions(-) create mode 100644 widgets/XcaTreeView.cpp create mode 100644 widgets/XcaTreeView.h diff --git a/Makefile b/Makefile index 1ccdacdf..c08e9082 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ TARGET=xca-$(TVERSION) export TOPDIR=$(shell pwd) -SUBDIRS=lib widgets view ui +SUBDIRS=lib widgets #view OBJECTS=$(patsubst %, %/target.obj, $(SUBDIRS)) INSTDIR=img misc lang doc CLEANDIRS=lang doc diff --git a/Rules.mak b/Rules.mak index 5590b5a9..20eba1bc 100644 --- a/Rules.mak +++ b/Rules.mak @@ -33,11 +33,14 @@ moc_%.cpp: %.h %.cpp $(UIC) -o $@ $< # same for the *.cpp file from the *.ui -%.cpp: %.h %.ui - $(UIC) -o $@ -impl $^ +#%.cpp: %.h %.ui +# $(UIC) -o $@ -impl $^ +#%.cpp: %.ui +# $(UIC) -o $@ $< # default compile rule -%.o: %.cpp $(TOPDIR)/Local.mak +#%.o: %.cpp $(TOPDIR)/Local.mak +%.o: %.cpp $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ # partial linking of objects in one directory diff --git a/configure b/configure index 01f92d16..0a241c90 100755 --- a/configure +++ b/configure @@ -28,7 +28,7 @@ done DIRS="$QTDIR $DIRS /usr /usr/X11R6 /usr/local" CF="-I. -I.." -LIBS=-lstdc++ +LIBS= LDIRS= MOC=moc UIC=uic @@ -100,29 +100,11 @@ search_lib() { echo -e "\n\nConfiguring XCA `cat VERSION`\n----------------------------" -######################## DB -subdirs="/db /db4.1 /db4 /db3" -search_includes db_cxx.h || err "The Berkeley DB header files were not found" -search_lib db_cxx db4_cxx db_cxx-4 db3_cxx db_cxx-3 || err "The Berkeley DB library was not found. Try installing db-dev" -## The fun of NPTL... (Thx Enrico Scholz) -echo 'int main() {}' >conftest.c -if g++ $LIBS $LDIRS $CF $CFLAGS conftest.c -o conftest &>conftest.log; then - : -else - search_lib pthread || err "Lib pthread needed for db_cxx and not found" -fi - ######################### QT -subdirs="/qt /Qt /qt4 /qt3 /qt2" -search_includes qobject.h || err "The QT Library headerfiles were not found. Set QTDIR appropriately." +subdirs="/qt /qt4" +search_includes Qt/qobject.h || err "The QT Library headerfiles were not found. Set QTDIR appropriately." search_lib QtGui qt qt-mt || err "The QT library was not found. Try installing qt-dev" search_lib c_r || true -# look if it compiles... -if g++ $LIBS $LDIRS $CF $CFLAGS conftest.c -o conftest &>conftest.log; then - : -else - search_lib c_r || err "Libc_r needed for FreeBSD systems and was not found" -fi ###################### OpenSSL subdirs="" @@ -132,19 +114,23 @@ search_lib crypto || err "The OpenSSL library was not found." export LD_LIBRARY_PATH ##### Try to compile them all together and show the versions. cat >conftest.c < #include -#include -#include +#include main(){ -printf("\nThe Versions of the used libraries are:\n\t%s\n\t%s\n\tQT: %s\n", - OPENSSL_VERSION_TEXT, DB_VERSION_STRING, QT_VERSION_STR ); + printf("\nThe Versions of the used libraries are:\n\t%s\n\tQT: %s\n", + OPENSSL_VERSION_TEXT, QT_VERSION_STR ); + if (QT_VERSION < 0x040001) { + printf("You need Qt 4 or greater\n"); + return 1; + } + return 0; } EOF if g++ $LIBS $LDIRS $CF $CFLAGS conftest.c -o conftest &>conftest.log ; then - ./conftest ||err "Unable to execute a freshly compiled application, maybe you have to adjust your LD_LIBRARY_PATH or /etc/ld.so.conf" - #rm -f conftest.c conftest conftest.log + ./conftest || err "Unable to execute a freshly compiled application, maybe you have to adjust your LD_LIBRARY_PATH or /etc/ld.so.conf" && rm -f conftest.c conftest conftest.log else err "Unable to compile a minimal application look at 'conftest.log' for errors" fi diff --git a/lib/db.cpp b/lib/db.cpp index abd538d7..c83684f8 100644 --- a/lib/db.cpp +++ b/lib/db.cpp @@ -1,5 +1,8 @@ #include "db.h" #include "base.h" +#ifdef __WIN32__ +#include +#else #include #include #include @@ -10,6 +13,7 @@ #include #include #include +#endif #if 0 int main() diff --git a/lib/db_key.cpp b/lib/db_key.cpp index b7a75fee..e5d7f686 100644 --- a/lib/db_key.cpp +++ b/lib/db_key.cpp @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include "exception.h" #include "ui/NewKey.h" diff --git a/lib/db_x509.cpp b/lib/db_x509.cpp index de8073f7..c072e1c3 100644 --- a/lib/db_x509.cpp +++ b/lib/db_x509.cpp @@ -45,13 +45,12 @@ * * $Id$ * - */ - + */ #include "db_x509.h" +#include "widgets/CertDetail.h" #include - db_x509::db_x509(QString DBfile, MainWindow *mw) :db_x509super(DBfile, mw) { @@ -464,4 +463,17 @@ void db_x509::newCert(NewX509 *dlg) } +void db_x509::showItem(QModelIndex &index) +{ + pki_x509 *crt = static_cast(index.internalPointer()); + CertDetail *dlg; + + dlg = new CertDetail(mainwin); + if (dlg) { + dlg->setCert(crt); + dlg->exec(); + delete dlg; + } +} + #undef FOR_ctr diff --git a/lib/db_x509.h b/lib/db_x509.h index 4b2d3ac1..9a2f69cd 100644 --- a/lib/db_x509.h +++ b/lib/db_x509.h @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * Copyright (C) 2001 Christian Hohnstaedt. * @@ -87,12 +88,12 @@ class db_x509: public db_x509super pki_x509 *getBySubject(const x509name &xname, pki_x509 *last = NULL); pki_base *insert(pki_base *item); void newCert(NewX509 *dlg); + void load(void); + void newItem(); + void showItem(QModelIndex &index); public slots: void revokeCert(const x509rev &revok, const pki_x509 *issuer); - void load(void); - void newItem(); - }; #endif diff --git a/lib/pki_x509.cpp b/lib/pki_x509.cpp index 78781ac6..7fc2a6f6 100644 --- a/lib/pki_x509.cpp +++ b/lib/pki_x509.cpp @@ -39,7 +39,6 @@ * http://www.trolltech.com * * - * * http://www.hohnstaedt.de/xca * email: christian@hohnstaedt.de * @@ -48,7 +47,6 @@ */ - #include "pki_x509.h" #include "func.h" #include "base.h" @@ -328,7 +326,7 @@ unsigned char *pki_x509::toData(int *size) unsigned char *p, *p1; // calculate the needed size - *size = i2d_X509(cert, NULL) + 100; + *size = i2d_X509(cert, NULL) + 45 + caSerial.toHex().length(); openssl_error(); p = (unsigned char*)OPENSSL_malloc(*size); p1 = p; @@ -346,8 +344,10 @@ unsigned char *pki_x509::toData(int *size) db::intToData(&p1, crlDays); // the CRL period p1 = lastCrl.i2d(p1); // last CRL date openssl_error(); - printf("###### Size = %d, real size=%d\n", *size, p1-p); - *size = p1-p; + if (*size != p1-p) { + printf("pki_x509::toData: Size = %d, real size=%d\n", *size, p1-p); + //abort(); + } return p; } @@ -649,32 +649,45 @@ x509rev pki_x509::getRev() a.setSerial(getSerial()); return a; } -#if 0 -void pki_x509::updateView() + +QVariant pki_x509::column_data(int col) { - pki_base::updateView(); QString truststatus[] = { tr("Not trusted"), tr("Trust inherited"), tr("Always Trusted") }; + + switch (col) { + case 0: + return QVariant(getIntName()); + case 1: + return QVariant(getSubject().getEntryByNid(NID_commonName)); + case 2: + return QVariant(getSerial().toHex()); + case 3: + return QVariant(getNotAfter().toSortable()); + case 4: + return QVariant(truststatus[ getTrust() ]); + case 5: + if (isRevoked()) + return QVariant(getRevoked().toSortable()); + break; + } + return QVariant(); + +} + +QVariant pki_x509::getIcon() +{ int pixnum = 0; - if (!pointer) return; + if (getRefKey()) { pixnum += 1; } if (calcEffTrust() == 0){ pixnum += 2; } - pointer->setPixmap(0, *icon[pixnum]); - pointer->setText(0, getIntName()); - pointer->setText(1, getSubject().getEntryByNid(NID_commonName)); - pointer->setText(2, getSerial().toHex() ); - pointer->setText(3, getNotAfter().toSortable() ); - pointer->setText(4, truststatus[ getTrust() ]); - if (isRevoked()) - pointer->setText(5, getRevoked().toSortable()); + return QVariant(*icon[pixnum]); } -#endif - QString pki_x509::getSigAlg() { QString alg = OBJ_nid2ln(OBJ_obj2nid(cert->sig_alg->algorithm)); diff --git a/lib/pki_x509.h b/lib/pki_x509.h index 325b0238..311d83ee 100644 --- a/lib/pki_x509.h +++ b/lib/pki_x509.h @@ -142,6 +142,8 @@ class pki_x509 : public pki_x509super x509v3ext getExtByNid(int nid); const EVP_MD *getDigest(); extList getExt(); + QVariant column_data(int col); + QVariant getIcon(); }; #endif diff --git a/lib/x509name.cpp b/lib/x509name.cpp index 2b0e363b..2901dc7f 100644 --- a/lib/x509name.cpp +++ b/lib/x509name.cpp @@ -229,13 +229,13 @@ void x509name::addEntryByNid(int nid, const QString entry) OPENSSL_free(data); } else { - const char *x = entry.toAscii(); - int type = ASN1_PRINTABLE_type((const unsigned char*)x,-1); + unsigned char *x = (unsigned char*)CCHAR(entry); + int type = ASN1_PRINTABLE_type(x,-1); if (fix_data(nid, &type) == 0) return; - X509_NAME_add_entry_by_NID(xn, nid, type, (unsigned char*)x,-1,-1,0); + X509_NAME_add_entry_by_NID(xn, nid, type, x,-1,-1,0); } } diff --git a/lib/x509rev.cpp b/lib/x509rev.cpp index 7828e6d9..4090c13c 100644 --- a/lib/x509rev.cpp +++ b/lib/x509rev.cpp @@ -49,11 +49,19 @@ #include "x509rev.h" +#if OPENSSL_VERSION_NUMBER >= 0x00908000L #define X509_REVOKED_dup(x5r) (X509_REVOKED *)ASN1_dup( \ (int (*)(void*,unsigned char**))i2d_X509_REVOKED, \ (void *(*)(void**, const unsigned char**, long int))d2i_X509_REVOKED, \ (char *)x5r) +#else +#define X509_REVOKED_dup(x5r) (X509_REVOKED *)ASN1_dup( \ + (int (*)())i2d_X509_REVOKED, \ + (char *(*)())d2i_X509_REVOKED, \ + (char *)x5r) +#endif + x509rev::x509rev() { rev = X509_REVOKED_new(); diff --git a/ui/About.ui b/ui/About.ui index 1a783f05..22f1c887 100644 --- a/ui/About.ui +++ b/ui/About.ui @@ -1,176 +1,126 @@ - -About_UI - - QDialog - - name - About_UI - - - geometry - - 0 - 0 - 561 - 392 - - - - caption - - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout2 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - image1 - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - text - - - - scaledContents - true - - - - - name - Spacer1_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton1 - - - text - Done - - - - - name - Spacer1 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - text - - - - scaledContents - true - - - - - - QTextBrowser - - name - textbox - - - - - - - PushButton1 - clicked() - About_UI - accept() - - - + + + + + About + + + + 0 + 0 + 561 + 392 + + + + + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + + 95 + 40 + + + + + 95 + 40 + + + + + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + Done + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 95 + 40 + + + + + 95 + 40 + + + + + + + true + + + + + + + + + + + + + + diff --git a/ui/CertDetail.ui b/ui/CertDetail.ui index c2356c8f..2ecfa29a 100644 --- a/ui/CertDetail.ui +++ b/ui/CertDetail.ui @@ -1,1294 +1,814 @@ - -CertDetail_UI - - QDialog - - name - CertDetail_UI - - - geometry - - 0 - 0 - 583 - 494 - - - - caption - - - - hAlign - - - layoutSpacing - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout14 + + + + + CertDetail + + + + 0 + 0 + 556 + 492 + + + + + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + + Arial + 14 + 50 + false + false + false + false + + + + Details of the Certificate + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 95 + 40 + + + + + 95 + 40 + + + + true + + + + + + + + + + S&tatus + + + + 8 + + + 6 + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + QFrame::Sunken + + + + 8 + + + 6 + + + + + Private key - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1 - - - font - - 14 - 1 - 1 - - - - frameShape - MShape - - - frameShadow - MShadow - - - text - Details of the Certificate - - - - - name - Spacer10 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - scaledContents - true - - - - - - QTabWidget - - name - Widget + + + + + + Signed by - - QWidget - - name - unnamed - - - title - S&tatus - - - - margin - 11 - - - spacing - 6 - - - - name - Spacer14 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QFrame - - name - Frame13 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QLineEdit - - name - descr - - - toolTip - The internal name of the certificate in the database - - - - QLabel - - name - TextLabel2 - - - text - Internal name - - - - QLabel - - name - TextLabel1_2_2 - - - text - Signature algorithm - - - - QLineEdit - - name - sigAlgo - - - palette - - - - 0 - 0 - 0 - - - 192 - 192 - 192 - - - 255 - 255 - 255 - - - 223 - 223 - 223 - - - 128 - 128 - 128 - - - 160 - 160 - 164 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 192 - 192 - 192 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 255 - 255 - 255 - - - 223 - 223 - 223 - - - 128 - 128 - 128 - - - 160 - 160 - 164 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 192 - 192 - 192 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - - - 0 - 0 - 0 - - - 192 - 192 - 192 - - - 255 - 255 - 255 - - - 223 - 223 - 223 - - - 128 - 128 - 128 - - - 160 - 160 - 164 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 192 - 192 - 192 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - - - - - QLabel - - name - TextLabel6 - - - text - Private key - - - - QLayoutWidget - - name - Layout5 - - - - margin - 0 - - - spacing - 6 - - - ClickLabel - - name - privKey - - - sizePolicy - - 7 - 0 - - - - - QLabel - - name - TextLabel1_3 - - - sizePolicy - - 0 - 1 - - - - text - Serial - - - - QLabel - - name - serialNr - - - sizePolicy - - 5 - 1 - - - - frameShape - Panel - - - frameShadow - Sunken - - - toolTip - The serial number of the certificate - - - - - - QLayoutWidget - - name - Layout20 - - - - margin - 0 - - - spacing - 6 - - - ClickLabel - - name - signCert - - - - ClickLabel - - name - trustState - - - sizePolicy - - 1 - 0 - - - - - - - QLabel - - name - TextLabel4 - - - text - Signed by - - - - - - QGroupBox - - name - GroupBox5_2 - - - title - Fingerprint - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel1_2 - - - text - MD5 - - - - QLabel - - name - fpMD5 - - - sizePolicy - - 7 - 1 - - - - frameShape - Panel - - - frameShadow - Sunken - - - toolTip - An md5 hashsum of the certificate - - - - QLabel - - name - TextLabel2_2 - - - text - SHA1 - - - - QLabel - - name - fpSHA1 - - - sizePolicy - - 7 - 1 - - - - frameShape - Panel - - - frameShadow - Sunken - - - toolTip - A SHA-1 hashsum of the certificate - - - - - - QGroupBox - - name - GroupBox5 - - - title - Validity - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - notBefore - - - sizePolicy - - 7 - 1 - - - - frameShape - Panel - - - frameShadow - Sunken - - - toolTip - The time since the certificate is valid - - - - QLabel - - name - notAfter - - - sizePolicy - - 7 - 1 - - - - frameShape - Panel - - - frameShadow - Sunken - - - toolTip - The time until the certificate is valid - - - - ClickLabel - - name - dateValid - - - - - - - name - Spacer18 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - unnamed - - - title - &Subject - - - - margin - 11 - - - spacing - 6 - - - - name - Spacer19 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - DistName - - name - subject - - - - - name - Spacer20 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - tab - - - title - &Issuer - - - - margin - 11 - - - spacing - 6 - - - - name - Spacer7 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - DistName - - name - issuer - - - - - name - Spacer8 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - unnamed - - - title - &Extensions - - - - margin - 11 - - - spacing - 6 - - - QTextView - - name - v3Extensions - - - palette - - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 237 - 237 - 237 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - 128 - 128 - 128 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 253 - 253 - 253 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 253 - 253 - 253 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - - - - - - QLayoutWidget - - name - Layout8 + + + + + + Signature algorithm - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - but_cancel - - - text - &Cancel - - - - - name - Horizontal Spacing2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - but_ok - - - text - &OK - - - + + + + + + 0 + + + 6 + + + + + + + + + 13 + 13 + 0 + 0 + + + + + + + + + + Internal name + + + + + + + + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 255 + 255 + 255 + + + 223 + 223 + 223 + + + 128 + 128 + 128 + + + 160 + 160 + 164 + + + 128 + 128 + 128 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 192 + 192 + 192 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 255 + + + 255 + 0 + 255 + + + 231 + 231 + 231 + + + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 255 + 255 + 255 + + + 223 + 223 + 223 + + + 128 + 128 + 128 + + + 160 + 160 + 164 + + + 128 + 128 + 128 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 192 + 192 + 192 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 255 + + + 255 + 0 + 255 + + + 231 + 231 + 231 + + + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 255 + 255 + 255 + + + 223 + 223 + 223 + + + 128 + 128 + 128 + + + 160 + 160 + 164 + + + 128 + 128 + 128 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 192 + 192 + 192 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 255 + + + 255 + 0 + 255 + + + 231 + 231 + 231 + + + + + + + + + + The internal name of the certificate in the database + + + + + + + 0 + + + 6 + + + + + + 13 + 13 + 0 + 0 + + + + + + + + + 0 + 1 + 0 + 0 + + + + Serial + + + + + + + + 5 + 1 + 0 + 0 + + + + The serial number of the certificate + + + QFrame::Panel + + + QFrame::Sunken + + + + + + - - - - - DistName -
distname.h
- - -1 - -1 - - 1 + + + + + GroupBox + + + + 8 + + + 6 + + + + + + 7 + 1 + 0 + 0 + + + + A SHA-1 hashsum of the certificate + + + QFrame::Panel + + + QFrame::Sunken + + + + + + + + 7 + 1 + 0 + 0 + + + + An md5 hashsum of the certificate + + + QFrame::Panel + + + QFrame::Sunken + + + + + + + SHA1 + + + + + + + MD5 + + + + + + + + + + Validity + + + + 8 + + + 6 + + + + + + 7 + 1 + 0 + 0 + + + + The time since the certificate is valid + + + QFrame::Panel + + + QFrame::Sunken + + + + + + + + 7 + 1 + 0 + 0 + + + + The time until the certificate is valid + + + QFrame::Panel + + + QFrame::Sunken + + + + + + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + &Subject + + + + 11 + + + 6 + + + + + + + + + &Issuer + + + + 11 + + + 6 + + + + + + + + + &Extensions + + + + 11 + + + 6 + + + + + + + + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + - 7 - 7 + 7 + 0 + 0 + 0 - image0 -
- - ClickLabel -
clicklabel.h
- - 100 - 26 - - 0 - - 7 - 0 - - image0 -
-
- - - image0 - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - - - - but_ok - clicked() - CertDetail_UI - accept() - - - but_cancel - clicked() - CertDetail_UI - reject() - - -
+ + + &OK + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + ClickLabel + QLabel +
widgets/clicklabel.h
+ 0 + +
+ + DistName + +
widgets/distname.h
+ 1 + +
+
+ + + + but_ok + clicked() + CertDetail + accept() + + + 259 + 502 + + + 319 + 503 + + + + + diff --git a/ui/CertExtend.ui b/ui/CertExtend.ui index 8c8ae5d3..db7706ce 100644 --- a/ui/CertExtend.ui +++ b/ui/CertExtend.ui @@ -1,448 +1,316 @@ - -CertExtend_UI - - QDialog - - name - CertExtend_UI - - - geometry - - 0 - 0 - 671 - 353 - - - - caption - - - - - margin - 11 + + + + + CertExtend + + + + 0 + 0 + 393 + 333 + + + + + + + + 8 + + + 6 + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 200 + 94 + + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + + This will create a new certificate as a copy of the old one with a new serial number and adjusted validity values. + + + true + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 368 + 16 + + + + + + + + 0 + + + 6 + + + + + Validity + + + + 8 - - spacing - 6 + + 6 - - QLayoutWidget - - name - Layout16_3_2 + + + + 0 + + + 6 + + + + + Not before - - - margin - 0 - - - spacing - 6 - - - - name - Spacer37_4_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 200 - 94 - - - - scaledContents - true - - - - - name - Spacer38_4_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QLabel - - name - TextLabel1 + + + + + + Not after - - text - This will create a new certificate as a copy of the old one with a new serial number and adjusted validity values. - - - alignment - WordBreak|AlignVCenter|AlignLeft - - - wordwrap - - - - - name - Spacer35 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLayoutWidget - - name - Layout24 - - - - margin - 0 - - - spacing - 6 - - - QGroupBox - - name - GroupBox8 - - - title - Validity - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout16 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1_2 - - - text - Not before - - - - QLabel - - name - TextLabel2_4 - - - text - Not after - - - - Validity - - name - notBefore - - - - Validity - - name - notAfter - - - - - - - - QGroupBox - - name - GroupBox35 - - - title - Time Range - - - - margin - 11 - - - spacing - 6 - - - QComboBox - - - text - Days - - - - - text - Months - - - - - text - Years - - - - name - validRange - - - - QPushButton - - name - applyTime - - - text - Apply - - - - QCheckBox - - name - midnightCB - - - text - Midnight - - - - QLineEdit - - name - validNumber - - - - - - - - - name - Spacer36 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLayoutWidget - - name - Layout15 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - PushButton3 - - - text - &Cancel - - - accel - 276824131 - - - - - name - Spacer37 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton2 - - - font - - - - - text - &OK - - - - - - - - - Validity -
validity.h
- - -1 - -1 - - 1 + + + + + + + + + + + + + + + + + Time range + + + + 8 + + + 6 + + + + + + Days + + + + + Months + + + + + Years + + + + + + + + Midnight + + + + + + + + + + + 1 + 1 + 0 + 0 + + + + Apply + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 368 + 16 + + + + + + + + 0 + + + 6 + + + + - 7 - 7 + 7 + 0 + 0 + 0 - image0 -
-
- - - image0 - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - - - - PushButton3 - clicked() - CertExtend_UI - reject() - - - PushButton2 - clicked() - CertExtend_UI - accept() - - - applyTime - clicked() - CertExtend_UI - applyTimeDiff() - - applyTimeDiff() - -
+ + + &Cancel + + + 276824131 + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + Sans Serif + 9 + 50 + false + false + false + false + + + + &OK + + + + + + + + + + + + Validity + +
validity.h
+ 1 + +
+
+ + + diff --git a/ui/CrlDetail.ui b/ui/CrlDetail.ui index 2cb161aa..c53b0247 100644 --- a/ui/CrlDetail.ui +++ b/ui/CrlDetail.ui @@ -1,837 +1,734 @@ - -CrlDetail_UI - - QDialog - - name - CrlDetail_UI + + + + + CrlDetail_UI + + + CrlDetail_UI - - geometry - - 0 - 0 - 588 - 481 - + + + 0 + 0 + 588 + 481 + - - caption - CrlDetail_UI + + CrlDetail_UI - - hAlign - - - layoutSpacing - - - - margin - 11 - - - spacing + + + 11 + + + 6 + + + + + 0 + + 6 - - - QLayoutWidget - - name - Layout14 + + + + + TextLabel1 + + + + + 14 + 0 + false + false + false + false + + + + Details of the Revocation list + + + + + + + + 20 + 20 + + + + Expanding + + + Horizontal + + + + + + + image + + + + 95 + 40 + + + + + 95 + 40 + + + + true + + + + + + + + + Widget + + + + unnamed - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1 - - - font - - 14 - 1 - 1 - - - - text - Details of the Revocation list - - - - - name - Spacer10 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - + + &Status + + + + 11 + + + 6 + + + + + + 20 + 20 + + + + Expanding + + + Vertical + - - QLabel - - name - image + + + + + Frame13 + + + Box + + + Sunken + + + + 11 - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - scaledContents - true + + 6 + + + + TextLabel4 + + + Signed by + + + + + + + TextLabel2 + + + Name + + + + + + + TextLabel6 + + + Signature + + + + + + + issuerIntName + + + + + + + descr + + + The internal name of the CRL in the database + + + + + + + 0 + + + 6 + + + + + signCheck + + + + 7 + 0 + 0 + 0 + + + + + + + + TextLabel1_3 + + + + 0 + 1 + 0 + 0 + + + + Version + + + + + + + version + + + + 1 + 1 + 0 + 0 + + + + QFrame::Panel + + + QFrame::Sunken + + + + + + - - - - QTabWidget - - name - Widget - - - QWidget - - name - unnamed - - - title - &Status - - - - margin - 11 + + + + + GroupBox5_2 + + + Issuing dates + + + + 11 - - spacing - 6 + + 6 - - - name - Spacer14 + + + + TextLabel1_2 - - orientation - Vertical + + Last Update - - sizeType - Expanding + + + + + + lUpdate - - sizeHint - - 20 - 20 - + + + 7 + 1 + 0 + 0 + - - - QFrame - - name - Frame13 + + QFrame::Panel - - frameShape - Box + + QFrame::Sunken - - frameShadow - Sunken + + + + + + TextLabel2_2 - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel4 - - - text - Signed by - - - - QLabel - - name - TextLabel2 - - - text - Name - - - - QLabel - - name - TextLabel6 - - - text - Signature - - - - ClickLabel - - name - issuerIntName - - - - QLineEdit - - name - descr - - - toolTip - The internal name of the CRL in the database - - - - QLayoutWidget - - name - Layout13 - - - - margin - 0 - - - spacing - 6 - - - ClickLabel - - name - signCheck - - - sizePolicy - - 7 - 0 - - - - - QLabel - - name - TextLabel1_3 - - - sizePolicy - - 0 - 1 - - - - text - Version - - - - QLabel - - name - version - - - sizePolicy - - 1 - 1 - - - - frameShape - Panel - - - frameShadow - Sunken - - - - - - - - QGroupBox - - name - GroupBox5_2 + + Next Update - - title - Issuing dates + + + + + + nUpdate - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel1_2 - - - text - Last Update - - - - QLabel - - name - lUpdate - - - sizePolicy - - 7 - 1 - - - - frameShape - Panel - - - frameShadow - Sunken - - - - QLabel - - name - TextLabel2_2 - - - text - Next Update - - - - QLabel - - name - nUpdate - - - frameShape - Panel - - - frameShadow - Sunken - - - - - - - name - Spacer18 + + QFrame::Panel - - orientation - Vertical + + QFrame::Sunken - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - Widget9 - - - title - &Issuer - - - - margin - 11 - - - spacing - 6 - - - DistName - - name - issuer - - - - - - QWidget - - name - tab - - - title - &Revocation list - - - - margin - 11 - - - spacing - 6 - - - QListView - - name - certList - - - toolTip - A list of all revoked certificates - - - - - - QWidget - - name - unnamed - - - title - &Extensions - - - - margin - 11 - - - spacing - 6 - - - QTextView - - name - v3Extensions - - - palette - - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 237 - 237 - 237 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - 128 - 128 - 128 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 253 - 253 - 253 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 253 - 253 - 253 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - - - - - - QLayoutWidget - - name - Layout8 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - but_cancel - - - text - &Cancel - + + + - - - name - Horizontal Spacing2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - + + + + + + 20 + 20 + + + + Expanding + + + Vertical + - - QPushButton - - name - but_ok - - - text - &OK - + + + + + + Widget9 + + + &Issuer + + + + 11 + + + 6 + + + + + issuer + - + + + + + + tab + + + &Revocation list + + + + 11 + + + 6 + + + + + certList + + + A list of all revoked certificates + + + + + + + + unnamed + + + &Extensions + + + + 11 + + + 6 + + + + + v3Extensions + + + + + + 0 + 0 + 0 + + + 220 + 220 + 220 + + + 255 + 255 + 255 + + + 237 + 237 + 237 + + + 110 + 110 + 110 + + + 146 + 146 + 146 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 220 + 220 + 220 + + + 220 + 220 + 220 + + + 0 + 0 + 0 + + + 84 + 112 + 152 + + + 255 + 255 + 255 + + + + + 0 + 0 + 0 + + + 220 + 220 + 220 + + + 255 + 255 + 255 + + + 253 + 253 + 253 + + + 110 + 110 + 110 + + + 146 + 146 + 146 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 0 + 0 + 0 + + + 220 + 220 + 220 + + + 220 + 220 + 220 + + + 0 + 0 + 0 + + + 84 + 112 + 152 + + + 255 + 255 + 255 + + + + + 128 + 128 + 128 + + + 220 + 220 + 220 + + + 255 + 255 + 255 + + + 253 + 253 + 253 + + + 110 + 110 + 110 + + + 146 + 146 + 146 + + + 0 + 0 + 0 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 220 + 220 + 220 + + + 220 + 220 + 220 + + + 0 + 0 + 0 + + + 84 + 112 + 152 + + + 255 + 255 + 255 + + + + + + + + - - - + + + + + 0 + + + 6 + + + + + but_cancel + + + &Cancel + + + + + + + + 20 + 20 + + + + Expanding + + + Horizontal + + + + + + + but_ok + + + &OK + + + + + + + + + - DistName -
distname.h
- - -1 - -1 - - 1 - - 7 - 7 - - image0 + DistName + +
distname.h
+ + -1 + -1 + + 1 + + 7 + 7 + + image0
- ClickLabel -
clicklabel.h
- - 100 - 26 - - 0 - - 7 - 0 - - image0 + ClickLabel + +
clicklabel.h
+ + 100 + 26 + + 0 + + 7 + 0 + + image0
-
- - - image0 - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 +
+ + + 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - - - but_ok - clicked() - CrlDetail_UI - accept() - - - but_cancel - clicked() - CrlDetail_UI - reject() - - -
+ + diff --git a/ui/ExportCert.ui b/ui/ExportCert.ui index 26876aa0..c8f16078 100644 --- a/ui/ExportCert.ui +++ b/ui/ExportCert.ui @@ -1,504 +1,414 @@ - -ExportCert_UI - - QDialog - - name - ExportCert_UI + + + + + ExportCert_UI + + + ExportCert_UI - - geometry - - 0 - 0 - 482 - 367 - + + + 0 + 0 + 482 + 367 + - - caption - + + - - - margin - 11 - - - spacing + + + 11 + + + 6 + + + + + 0 + + 6 - - - QLayoutWidget - - name - Layout9 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel12 - - - font - - 14 - 1 - 1 - - - - text - Certificate export - - - - - name - Spacer6 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - scaledContents - true - - - - - - - name - Spacer5 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint + + + + + TextLabel12 + + + + + 14 + 0 + false + false + false + false + + + + Certificate export + + + + + + - 20 - 20 + 20 + 20 - - - - QFrame - - name - Frame6 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QToolButton - - name - ToolButton1 - - - sizePolicy - - 0 - 1 - - - - text - ... - - - - QLabel - - name - TextLabel14 - - - sizePolicy - - 0 - 1 - - - - text - Filename - - - - QLineEdit - - name - filename - - - - QPushButton - - name - PushButton3 - - - sizePolicy - - 1 - 0 - - - - text - TinyCA filename - - - toolTip - Set the filename to the one used by TinyCA - - - - QLabel - - name - TextLabel13 - - - sizePolicy - - 7 - 5 - - - - text - Please enter the filename for the certificate. - - - - - - QFrame - - name - Frame5 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel3 - - - sizePolicy - - 5 - 0 - - - - text - DER is a binary format of the Certificate - - - - QLabel - - name - TextLabel3_3 - - - sizePolicy - - 5 - 0 - - - - text - PEM is a base64 encoded Certificate - - - - QLabel - - name - TextLabel3_2 - - - sizePolicy - - 5 - 0 - - - - text - PKCS#7 is an official Certificate exchange format - - - - QLabel - - name - TextLabel3_3 - - - sizePolicy - - 5 - 0 - - - - text - PKCS#12 is an encrypted official Key-Certificate exchange format - - - - QLayoutWidget - - name - Layout4 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1 - - - text - Export Format - - - - QComboBox - - name - exportFormat - - - sizePolicy - - 7 - 0 - - - - - - - - - - name - Spacer4 - - - orientation - Vertical - - - sizeType + + Expanding - - - sizeHint + + + Horizontal + + + + + + + image + + - 20 - 20 + 95 + 40 - + + + + 95 + 40 + + + + true + + + + + + + + + + 20 + 20 + + + + Expanding + + + Vertical + - - QLayoutWidget - - name - Layout6 + + + + + Frame6 + + + Box + + + Sunken + + + + 11 - - - margin - 0 + + 6 + + + + + ToolButton1 - - spacing - 6 + + + 0 + 1 + 0 + 0 + - - QPushButton - - name - PushButton9 - - - text - Cancel - - - - - name - Spacer7 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton7 - - - text - OK - - - + + ... + + + + + + + TextLabel14 + + + + 0 + 1 + 0 + 0 + + + + Filename + + + + + + + filename + + + + + + + PushButton3 + + + + 1 + 0 + 0 + 0 + + + + TinyCA filename + + + Set the filename to the one used by TinyCA + + + + + + + TextLabel13 + + + + 7 + 5 + 0 + 0 + + + + Please enter the filename for the certificate. + + + + - - - - - PushButton7 - clicked() - ExportCert_UI - accept() - - - PushButton9 - clicked() - ExportCert_UI - reject() - - - ToolButton1 - clicked() - ExportCert_UI - chooseFile() - - - exportFormat - activated(const QString&) - ExportCert_UI - formatChanged() - - - PushButton3 - clicked() - ExportCert_UI - setTinyCAfname() - - chooseFile() - formatChanged() - setTinyCAfname() - - + + + + + Frame5 + + + Box + + + Sunken + + + + 11 + + + 6 + + + + + TextLabel3 + + + + 5 + 0 + 0 + 0 + + + + DER is a binary format of the Certificate + + + + + + + TextLabel3_3 + + + + 5 + 0 + 0 + 0 + + + + PEM is a base64 encoded Certificate + + + + + + + TextLabel3_2 + + + + 5 + 0 + 0 + 0 + + + + PKCS#7 is an official Certificate exchange format + + + + + + + TextLabel3_3 + + + + 5 + 0 + 0 + 0 + + + + PKCS#12 is an encrypted official Key-Certificate exchange format + + + + + + + 0 + + + 6 + + + + + TextLabel1 + + + Export Format + + + + + + + exportFormat + + + + 7 + 0 + 0 + 0 + + + + + + + + + + + + + + 20 + 20 + + + + Expanding + + + Vertical + + + + + + + 0 + + + 6 + + + + + PushButton9 + + + Cancel + + + + + + + + 20 + 20 + + + + Expanding + + + Horizontal + + + + + + + PushButton7 + + + OK + + + + + + + + qPixmapFromMimeSource + filename PushButton7 PushButton9 - - + + diff --git a/ui/ExportKey.ui b/ui/ExportKey.ui index a8d78a1f..08030986 100644 --- a/ui/ExportKey.ui +++ b/ui/ExportKey.ui @@ -1,446 +1,314 @@ - -ExportKey_UI - - QDialog - - name - ExportKey_UI - - - geometry - - 0 - 0 - 575 - 375 - - - - caption - ExportKey_UI - - - - margin - 11 + + + + + ExportKey + + + + 0 + 0 + 450 + 388 + + + + ExportKey + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + + Arial + 14 + 50 + false + false + false + false + + + + Key export + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 95 + 40 + + + + + 95 + 40 + + + + true + + + + + + + + + Please enter the filename for the key. + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 8 + + + 6 + + + + + Filename - - spacing - 6 + + + + + + + + + + 1 + 0 + 0 + 0 + - - QLayoutWidget - - name - Layout9 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel12 - - - font - - 14 - 1 - 1 - - - - text - Key export - - - - - name - Spacer6 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - scaledContents - true - - - - - - QLabel - - name - TextLabel13 - - - text - Please enter the filename for the key. - - - alignment - WordBreak|AlignVCenter|AlignLeft - - - wordwrap - - - - QFrame - - name - Frame5_2 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel14 - - - text - Filename - - - - QLineEdit - - name - filename - - - - QToolButton - - name - ToolButton1 - - - sizePolicy - - 1 - 0 - - - - text - ... - - - - - - QLabel - - name - TextLabel3 - - - text - DER is a binary format of the key without encryption + + ... + + + + + + + + + + DER is a binary format of the key without encryption PEM is a base64 encoded key with optional encryption PKCS#8 is an encrypted official Key-exchange format - - - alignment - WordBreak|AlignVCenter|AlignLeft - - - wordwrap - - - - QFrame - - name - Frame4 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel1 - - - text - Export Format - - - - QComboBox - - name - exportFormat - - - sizePolicy - - 7 - 0 - - - - - - - QLabel - - name - TextLabel2 - - - text - When exporting the private key it should be encrypted. - - - alignment - WordBreak|AlignVCenter|AlignLeft - - - wordwrap - - - - QFrame - - name - privFrame - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QCheckBox - - name - exportPrivate - - - text - E&xport the private part of the Key too - - - toolTip - When exporting the private part, it should be encrypted. - - - - QCheckBox - - name - encryptKey - - - enabled - false - - - text - &Encrypt the Key with a password - - - - - - QLayoutWidget - - name - Layout6 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - PushButton9 - - - text - &Cancel - - - - - name - Spacer7 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton7 - - - text - &OK - - - - - - - - - PushButton7 - clicked() - ExportKey_UI - accept() - - - PushButton9 - clicked() - ExportKey_UI - reject() - - - ToolButton1 - clicked() - ExportKey_UI - chooseFile() - - - exportPrivate - stateChanged(int) - ExportKey_UI - canEncrypt() - - - exportFormat - activated(int) - ExportKey_UI - canEncrypt() - - - exportFormat - activated(int) - ExportKey_UI - formatChanged() - - canEncrypt() - chooseFile() - formatChanged() - setTinyCAfname() - - - filename - exportPrivate - encryptKey - PushButton7 - PushButton9 - - + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 8 + + + 6 + + + + + Export Format + + + + + + + + 7 + 0 + 0 + 0 + + + + + + + + + + + When exporting the private key it should be encrypted. + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 8 + + + 6 + + + + + When exporting the private part, it should be encrypted. + + + E&xport the private part of the Key too + + + + + + + false + + + &Encrypt the Key with a password + + + + + + + + + + 0 + + + 6 + + + + + &Cancel + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + &OK + + + + + + + + + + filename + exportPrivate + encryptKey + PushButton7 + PushButton9 + + + + + PushButton9 + clicked() + ExportKey + reject() + + + 52 + 360 + + + 155 + 359 + + + + + PushButton7 + clicked() + ExportKey + accept() + + + 421 + 364 + + + 278 + 355 + + + + + diff --git a/ui/ExportTinyCA.ui b/ui/ExportTinyCA.ui index e548300e..5e540d39 100644 --- a/ui/ExportTinyCA.ui +++ b/ui/ExportTinyCA.ui @@ -1,440 +1,355 @@ - -ExportTinyCA_UI - - QDialog - - name - ExportTinyCA_UI + + + + + ExportTinyCA_UI + + + ExportTinyCA_UI - - geometry - - 0 - 0 - 581 - 300 - + + + 0 + 0 + 581 + 300 + - - caption - + + - - - margin - 11 - - - spacing + + + 11 + + + 6 + + + + + 0 + + 6 - - - QLayoutWidget - - name - Layout9_2 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel12_2 - - - font - - 14 - 1 - 1 - - - - text - TinyCA export - - - - - name - Spacer6_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image_2 - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - scaledContents - true - - - - - - - name - Spacer10 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint + + + + + TextLabel12_2 + + + + + 14 + 0 + false + false + false + false + + + + TinyCA export + + + + + + - 20 - 20 + 20 + 20 - - - - QFrame - - name - Frame5_2 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel14 - - - text - Templatedir - - - - QLineEdit - - name - tempdir - - - toolTip - The directory, where the openssl.cnf template can be found - - - - QToolButton - - name - ToolButton1 - - - sizePolicy - - 1 - 0 - - - - text - ... - - - - - - QFrame - - name - Frame5_2_2 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel14_2 - - - text - TinyCA Directory - - - - QLineEdit - - name - tinycadir - - - toolTip - the TinyCA database directory, usually: ~/.TinyCA/ - - - - QToolButton - - name - ToolButton1_2 - - - sizePolicy - - 1 - 0 - - - - text - ... - - - - - - QFrame - - name - Frame5_2_2_2 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel14_2_2 - - - text - Name - - - - QLineEdit - - name - dname - - - toolTip - The name of CA - - - - QToolButton - - name - ToolButton1_2_2 - - - sizePolicy - - 1 - 0 - - - - text - ... - - - - - - - name - Spacer8 - - - orientation - Vertical - - - sizeType + + Expanding - - - sizeHint + + + Horizontal + + + + + + + image_2 + + - 20 - 20 + 95 + 40 - + + + + 95 + 40 + + + + true + + + + + + + + + + 20 + 20 + + + + Expanding + + + Vertical + - - QLayoutWidget - - name - Layout6 + + + + + Frame5_2 + + + Box + + + Sunken + + + + 11 - - - margin - 0 + + 6 + + + + + TextLabel14 - - spacing - 6 + + Templatedir - - QPushButton - - name - PushButton9 - - - text - &Cancel - - - - - name - Spacer7 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton7 - - - text - &OK - - - + + + + + + tempdir + + + The directory, where the openssl.cnf template can be found + + + + + + + ToolButton1 + + + + 1 + 0 + 0 + 0 + + + + ... + + + + - - - - - PushButton9 - clicked() - ExportTinyCA_UI - reject() - - - PushButton7 - clicked() - ExportTinyCA_UI - accept() - - - ToolButton1_2 - clicked() - ExportTinyCA_UI - chooseTinyCaDir() - - - ToolButton1 - clicked() - ExportTinyCA_UI - chooseTempDir() - - chooseTempDir() - chooseTinyCaDir() - - + + + + + Frame5_2_2 + + + Box + + + Sunken + + + + 11 + + + 6 + + + + + TextLabel14_2 + + + TinyCA Directory + + + + + + + tinycadir + + + the TinyCA database directory, usually: ~/.TinyCA/ + + + + + + + ToolButton1_2 + + + + 1 + 0 + 0 + 0 + + + + ... + + + + + + + + + + Frame5_2_2_2 + + + Box + + + Sunken + + + + 11 + + + 6 + + + + + TextLabel14_2_2 + + + Name + + + + + + + dname + + + The name of CA + + + + + + + ToolButton1_2_2 + + + + 1 + 0 + 0 + 0 + + + + ... + + + + + + + + + + + 20 + 20 + + + + Expanding + + + Vertical + + + + + + + 0 + + + 6 + + + + + PushButton9 + + + &Cancel + + + + + + + + 20 + 20 + + + + Expanding + + + Horizontal + + + + + + + PushButton7 + + + &OK + + + + + + + + qPixmapFromMimeSource + diff --git a/ui/Help.ui b/ui/Help.ui index da2e8992..efeb7900 100644 --- a/ui/Help.ui +++ b/ui/Help.ui @@ -1,147 +1,92 @@ - -Help_UI - - QDialog - - name - Help_UI - - - geometry - - 0 - 0 - 737 - 619 - - - - caption - - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout6 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - back - - - text - << - - - autoDefault - true - - - - QPushButton - - name - forward - - - text - >> - - - autoDefault - true - - - - - name - Horizontal Spacing2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - buttonOk - - - text - &Done - - - autoDefault - true - - - default - true - - - - - - QTextBrowser - - name - textbox - - - - - - - buttonOk - clicked() - Help_UI - accept() - - - back - clicked() - textbox - backward() - - - forward - clicked() - textbox - forward() - - - + + + + + Help + + + + 0 + 0 + 737 + 619 + + + + + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + << + + + true + + + + + + + >> + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + &Done + + + true + + + true + + + + + + + + + + + qPixmapFromMimeSource + + + diff --git a/ui/ImportMulti.ui b/ui/ImportMulti.ui index d455ce4a..8b244d3b 100644 --- a/ui/ImportMulti.ui +++ b/ui/ImportMulti.ui @@ -1,196 +1,107 @@ - -ImportMulti_UI - - QDialog - - name - ImportMulti_UI - - - geometry - - 0 - 0 - 666 - 328 - - - - caption - ImportMulti_UI - - - - margin - 11 + + + + + ImportMulti + + + + 0 + 0 + 506 + 289 + + + + ImportMulti_UI + + + + 8 + + + 6 + + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 8 + + + 6 + + + + + Import &All - - spacing - 6 + + + + + + &Import - - QListView - - name - itemView - - - - QFrame - - name - Frame9 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QPushButton - - name - buttonOk - - - text - Import &All - - - autoDefault - true - - - default - true - - - - QPushButton - - name - PushButton4 - - - text - &Import - - - - QPushButton - - name - buttonCancel - - - text - &Done - - - autoDefault - true - - - - QPushButton - - name - PushButton9 - - - text - &Remove - - - - - name - Spacer1 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 200 - 94 - - - - scaledContents - true - - - - - - - - - buttonCancel - clicked() - ImportMulti_UI - reject() - - - itemView - rightButtonClicked(QListViewItem*,const QPoint&,int) - ImportMulti_UI - showPopupMenu(QListViewItem *, const QPoint &, int) - - - PushButton4 - clicked() - ImportMulti_UI - import() - - - buttonOk - clicked() - ImportMulti_UI - importAll() - - - PushButton9 - clicked() - ImportMulti_UI - remove() - - import() - importAll() - remove() - showPopupMenu(QListViewItem *, const QPoint &, int) - - + + + + + + &Done + + + + + + + &Remove + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 204 + 16 + + + + + + + + + 200 + 94 + + + + true + + + + + + + + + + + diff --git a/ui/KeyDetail.ui b/ui/KeyDetail.ui index 6712a7da..5983f1eb 100644 --- a/ui/KeyDetail.ui +++ b/ui/KeyDetail.ui @@ -1,440 +1,340 @@ - -KeyDetail_UI - - QDialog - - name - KeyDetail_UI - - - geometry - - 0 - 0 - 538 - 473 - - - - caption - KeyDetail_UI - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout8 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - tlHeader - - - font - - 14 - 1 - 1 - - - - text - Details of the RSA key - - - - - name - Spacer5 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - sizePolicy - - 0 - 0 - - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - frameShape - MShape - - - frameShadow - MShadow - - - scaledContents - true - - - - - - QLayoutWidget - - name - Layout10 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1 - - - text - Name - - - - ClickLabel - - name - keyPrivEx - - - - QLineEdit - - name - keyDesc - - - maxLength - 32767 - - - toolTip - The internal name of the key used by xca - - - - QLayoutWidget - - name - Layout9 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - keyPubEx - - - sizePolicy - - 7 - 0 - - - - frameShape - Panel - - - frameShadow - Sunken - - - toolTip - - - - - - name - Spacer3 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - TextLabel3 - - - text - Keysize - - - - QLabel - - name - keyLength - - - sizePolicy - - 7 - 0 - - - - frameShape - Panel - - - frameShadow - Sunken - - - - - - QLabel - - name - tlPrivEx - - - text - Private Exponent - - - - QLabel - - name - tlPubEx - - - text - Public Exponent - - - - - - QLabel - - name - tlModulus - - - sizePolicy - - 1 - 0 - - - - text - Modulus - - - - QTextView - - name - keyModulus - - - textFormat - PlainText - - - - QLayoutWidget - - name - Layout25 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - but_cancel - - - text - &Cancel - - - - - name - Spacer4 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - but_ok - - - text - &OK - - - flat - false - - - - - - - - - ClickLabel -
clicklabel.h
- - 100 - 26 - - 0 + + + + + KeyDetail + + + + 0 + 0 + 538 + 419 + + + + KeyDetail + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + + Arial + 14 + 50 + false + false + false + false + + + + Details of the RSA key + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + - 7 - 0 + 0 + 0 + 0 + 0 - image0 -
-
- - - image0 - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - - - - but_cancel - clicked() - KeyDetail_UI - reject() - - - but_ok - clicked() - KeyDetail_UI - accept() - - - but_ok - clicked() - KeyDetail_UI - accept() - - - keyDesc - returnPressed() - KeyDetail_UI - accept() - - -
+ + + + 95 + 40 + + + + + 95 + 40 + + + + true + + + + + + + + + 0 + + + 6 + + + + + Name + + + + + + + The internal name of the key used by xca + + + 32767 + + + + + + + 0 + + + 6 + + + + + + 7 + 0 + 0 + 0 + + + + QFrame::Panel + + + QFrame::Sunken + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + Keysize + + + + + + + + 7 + 0 + 0 + 0 + + + + QFrame::Panel + + + QFrame::Sunken + + + + + + + + + Private Exponent + + + + + + + Public Exponent + + + + + + + + + + + + + 1 + 0 + 0 + 0 + + + + Modulus + + + + + + + + 5 + 7 + 0 + 0 + + + + QFrame::Panel + + + QFrame::Sunken + + + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 3 + 5 + 0 + 0 + + + + &OK + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 151 + 29 + + + + + + + + + + + 0 + 0 + 100 + 30 + + + + + + + + ClickLabel + QWidget +
widgets/clicklabel.h
+ 0 + +
+
+ + + + but_ok + clicked() + KeyDetail + accept() + + + 201 + 385 + + + 57 + 388 + + + + + diff --git a/ui/MainWindow.ui b/ui/MainWindow.ui index 56200d7e..3ebeeab7 100644 --- a/ui/MainWindow.ui +++ b/ui/MainWindow.ui @@ -1,798 +1,597 @@ - -MainWindow_UI - - - MainWindow_UI + + + + + MainWindow + + + + 0 + 0 + 698 + 369 + + + + MainWindow + + + + + 8 - - - 0 - 0 - 818 - 541 - + + 6 - - MainWindow_UI - - - - unnamed + + + + + Private Keys + + + + 8 - + + 6 + + + + + QAbstractItemView::SingleSelection + + + + + + + + 1 + 1 + 0 + 0 + + + + QFrame::Box + + + QFrame::Sunken + + + 11 - - + + 6 + + + + + &New Key + + + + + + + &Export + + + + + + + &Import + + + + + + + Import PFX (PKCS#12) + + + + + + + &Show Details + + + + + + + &Delete + + + + + + + Change password + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 200 + 94 + + + + true + + + + + + + + + + + Certificate signing requests + + + + 8 - - - MainTab - - - - RSATab - - - Private Keys - - - - unnamed - - - 11 - - - 6 - - - - keyList - - - - - Frame4 - - - - 1 - 1 - 0 - 0 - - - - Box - - - Sunken - - - - unnamed - - - 11 - - - 6 - - - - BNnewKey - - - &New Key - - - - - BNexportKey - - - &Export - - - - - BNimportKey - - - &Import - - - - - BNimportPFX - - - Import PFX (PKCS#12) - - - - - BNdetailsKey - - - &Show Details - - - - - BNdeleteKey - - - &Delete - - - - - BNchangePass - - - Change password - - - - - Spacer1 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - bigKey - - - - 200 - 94 - - - - true - - - - - - - - - CertTab - - - Certificate signing requests - - - - unnamed - - - 11 - - - 6 - - - - reqList - - - - - Frame6 - - - - 1 - 5 - 0 - 0 - - - - Box - - - Sunken - - - - unnamed - - - 11 - - - 6 - - - - BNnewReq - - - &New Request - - - - - BNimportReq - - - &Import - - - - - BNdetailsReq - - - &Show Details - - - - - BNdeleteReq - - - &Delete - - - - - Spacer8 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - bigCsr - - - - 200 - 94 - - - - true - - - - - - - - - ReqTab - - - Certificates - - - - unnamed - - - 11 - - - 6 - - - - certList - - - - - Frame6_2 - - - Box - - - Sunken - - - - unnamed - - - 11 - - - 6 - - - - BNnewCert - - - &New Certificate - - - - - BNexportCert - - - &Export - - - - - BNimportCert - - - &Import - - - - - BNdetailsCert - - - &Show Details - - - - - BNdeleteCert - - - &Delete - - - - - BNimportPKCS12 - - - Import &PKCS#12 - - - - - BNimportPKCS7 - - - Import P&KCS#7 - - - - - BNviewState - - - Plain View - - - - - Spacer9 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - bigCert - - - - 200 - 94 - - - - true - - - - - - - - - CATab - - - Templates - - - - unnamed - - - 11 - - - 6 - - - - tempList - - - - - FrameAA - - - Box - - - Sunken - - - - unnamed - - - 11 - - - 6 - - - - BNemptyTemp - - - New &empty template - - - - - BNcaTemp - - - New C&A template - - - - - BNclientTemp - - - New &client template - - - - - BNserverTemp - - - New &server template - - - - - BNchangeTemp - - - Ch&ange Template - - - - - BNdeleteTemp - - - &Delete - - - - - BNimportTemp - - - Import - - - - - BNexportTemp - - - Export - - - - - Spacer9_2 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - bigTemp - - - - 200 - 94 - - - - true - - - - - - - - - unnamed - - - Revocation lists - - - - unnamed - - - 11 - - - 6 - - - - crlList - - - - - FrameAA_2 - - - Box - - - Sunken - - - - unnamed - - - 11 - - - 6 - - - - BNimportCrl - - - &Import - - - - - BNdetailsCrl - - - &Show Details - - - - - BNdeleteCrl - - - &Delete - - - - - Spacer9_2_2 - - - Vertical - - - Expanding - - - - 20 - 20 - - - - - - bigRev - - - - 200 - 94 - - - - true - - - - - - - - - - - - - - KeyView -
KeyView.h
- - -1 - -1 - - 1 - - 7 - 7 + + 6 + + + + + + + + + 1 + 5 0 0 - - image0 -
- - ReqView -
ReqView.h
- - -1 - -1 - - 1 - - 7 - 7 - 0 - 0 - - image0 -
- - CertView -
CertView.h
- - -1 - -1 - - 1 - - 7 - 7 - 0 - 0 - - image0 -
- - TempView -
TempView.h
- - -1 - -1 - - 1 - - 7 - 7 - 0 - 0 - - image0 -
- - CrlView -
CrlView.h
- - -1 - -1 - - 1 - - 7 - 7 - 0 - 0 - - image0 -
-
- - - 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000002d549444154388dad954f48147114c73fbb33b6399a075b313d581ddc352f42170f0929eab5407031e8929d942824c2e82a1da29b8740c9bd04057ad134a514bd186ee36e4276709dda560d5977d7249d7567ffcc4e07dd45626577a32fbcdfccfbfd980fef3de6bd1f866190cb805640079e02c3c0b99cdf1400ed066a0137e0079a7382811780f19f6c08104d86616032998cb5c561c27e1789d86fcca285427446b2a2c754b6569ddc7a064099983e0cfb5d6c7e7192320a620220086002927a66ab34034ec47e9332e0f6f3c2c100a34fce62a0a5dde20cf864fae17018b148448da8ac7e59656a6a8abdbd3d9aae35515d5d8d2449149714b3b1b98173c4c9fcdc3c95f60eb6bebe4e23c40cf8a4464646d809ede05a72217f92e9747432383888f5bc15004dd358fcb8c8867f83e04e306b0659c1fdfdfd9977b368c6e3f130fc7298bb77eee25df7323030c08a6785dddd5d2449ca1f0c60b3d9e8e9ed412c12a9b05660b7db292b2b43595768bede4cf79d6e26de4eb0bfbfcfccbb99fcc03df77ab879e326edaded2492092c672cc4e231cc8299783c4e6363236dad6dd8ec367c3e5f56b0391b581004f4948e1a51319b8f60a15088c3c343144561766e9603f5804b172f110e85f32fc5f4e434d6722bb5b5b558cbad08824020184092244a4a4a58f3ae313e39cecae715963dcb59c15923defeb94d281c425555a2d1285a5463617e81d1b151bc5e2f6ed94d3010c4e1705067abcb1facc535946f0abe1f3e7c7e1ff1449c96961614af82dbe3a6e6720d8140005dd7e9ededcdbf14a228227f92a9bf528fa3d3412412a1ea42157d0ffb68b8dac0fb0fef9197656459a6abab2b2b383ddd8ca5b1fbc69bc7ff3ed55c630f8c578f32be2d13b11e533171d4f395f68eec519c228b5481faebfb11f2ef526cad3a49ea60a09decf9bc641c2fa954662b992ec550ae540bb031a02a3de845a018283d7e9edaea399404a2809a069b00e1182870ca6f9887521cdd8fc93f3ef0c4cac7ee18430000000049454e44ae426082 - - - - MainTab - BNnewKey - BNexportKey - BNimportKey - BNdetailsKey - BNdeleteKey - BNnewReq - BNimportReq - BNdetailsReq - BNdeleteReq - BNnewCert - BNexportCert - BNimportCert - BNdetailsCert - BNdeleteCert - BNimportPKCS12 - BNemptyTemp - BNcaTemp - BNclientTemp - BNserverTemp - BNchangeTemp - BNdeleteTemp - - - - - keyview.h - reqview.h - certview.h - tempview.h - crlview.h - -
+ +
+ + QFrame::Box + + + QFrame::Sunken + + + + 8 + + + 6 + + + + + &New Request + + + + + + + &Export + + + + + + + &Import + + + + + + + &Show Details + + + + + + + &Delete + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 200 + 94 + + + + true + + + + +
+ + + + + + Certificates + + + + 8 + + + 6 + + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 11 + + + 6 + + + + + &New Certificate + + + + + + + &Export + + + + + + + &Import + + + + + + + &Show Details + + + + + + + &Delete + + + + + + + Import &PKCS#12 + + + + + + + Import P&KCS#7 + + + + + + + Plain View + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 200 + 94 + + + + true + + + + + + + + + + + Templates + + + + 8 + + + 6 + + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 11 + + + 6 + + + + + New &empty template + + + + + + + New C&A template + + + + + + + New &client template + + + + + + + New &server template + + + + + + + Ch&ange Template + + + + + + + &Delete + + + + + + + Import + + + + + + + Export + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 200 + 94 + + + + true + + + + + + + + + + + Revocation lists + + + + 8 + + + 6 + + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 11 + + + 6 + + + + + &Import + + + + + + + &Show Details + + + + + + + &Delete + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 200 + 94 + + + + true + + + + + + + + + + + + + + + + + XcaTreeView + QTreeView +
widgets/XcaTreeView.h
+ 0 + +
+
+ + +
diff --git a/ui/NewKey.ui b/ui/NewKey.ui index 9256a09e..2f85c7ea 100644 --- a/ui/NewKey.ui +++ b/ui/NewKey.ui @@ -1,371 +1,286 @@ - -NewKey_UI - - QDialog - - name - NewKey_UI - - - geometry - - 0 - 0 - 364 - 244 - - - - caption + + + + + NewKey + + + + 0 + 0 + 420 + 256 + + + + New key + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + + Arial + 14 + 50 + false + false + false + false + + + New key - - - - margin - 11 + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 95 + 40 + + + + + 95 + 40 + + + + + + + true + + + + + + + + + Please give a name to the new key and select the desired keysize + + + + + + + Key properties + + + + 8 + + + 6 + + + + + Name - - spacing - 6 + + + + + + Keysize - - QLayoutWidget - - name - Layout4 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel6 - - - font - - 14 - 1 - 1 - - - - text - New key - - - - - name - Spacer1 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - text - - - - scaledContents - true - - - - - - QLabel - - name - TextLabel1 - - - text - Please give a name to the new key and select the desired keysize - - - alignment - WordBreak|AlignVCenter|AlignLeft - - - wordwrap - - - - QGroupBox - - name - GroupBox4 - - - title - Key properties - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel5 - - - text - Name - - - - QLabel - - name - TextLabel2 - - - text - Keysize - - - - QLineEdit - - name - keyDesc - - - minimumSize - - 0 - 0 - - - - maximumSize - - 32767 - 32767 - - - - text - New Key - - - toolTip - The internal name of the new key - - - - QComboBox - - name - keyLength - - - sizePolicy - - 7 - 0 - - - - toolTip - Usually 1024 or 2048 bit keys are used - - - - QComboBox - - - text - RSA - - - - - text - DSA - - - - name - keyType - - - - QLabel - - name - TextLabel1_2 - - - text - Keytype - - - - - - - name - Spacer3 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLayoutWidget - - name - Layout28 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - PushButton2 - - - text - &Cancel - - - - - name - Spacer2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton1 - - - text - C&reate - - - - - - - - - PushButton2 - clicked() - NewKey_UI - reject() - - - PushButton1 - clicked() - NewKey_UI - accept() - - - PushButton1 - stateChanged(int) - NewKey_UI - generateKey() - - - keyDesc - returnPressed() - NewKey_UI - accept() - - generateKey() - - - keyDesc - keyLength - PushButton1 - PushButton2 - - + + + + + + + RSA + + + + + DSA + + + + + + + + + 7 + 0 + 0 + 0 + + + + Usually 1024 or 2048 bit keys are used + + + + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + The internal name of the new key + + + New Key + + + + + + + Keytype + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 351 + 16 + + + + + + + + 0 + + + 6 + + + + + &Cancel + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + C&reate + + + + + + + + qPixmapFromMimeSource + + keyDesc + keyLength + keyType + PushButton1 + PushButton2 + + + + + PushButton1 + clicked() + NewKey + accept() + + + 395 + 228 + + + 244 + 211 + + + + + PushButton2 + clicked() + NewKey + reject() + + + 29 + 227 + + + 107 + 200 + + + + + diff --git a/ui/NewX509.ui b/ui/NewX509.ui index a2480776..7e6abf98 100644 --- a/ui/NewX509.ui +++ b/ui/NewX509.ui @@ -1,3266 +1,1441 @@ - -NewX509_UI - - QWizard - - name - NewX509_UI - - - geometry - - 0 - 0 - 571 - 614 - - - - caption - NewX509_UI - - - QWidget - - name - page0 - - - title - - - - - margin - 11 + + + + + NewX509 + + + + 0 + 0 + 557 + 608 + + + + Dialog + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 200 + 94 + + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + + + Source + + + + 8 + + + 6 + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 16 + + + + + + + + Signing request + + + + 8 + + + 6 + + + + + 0 - - spacing - 6 + + 6 - - QLayoutWidget - - name - Layout15 - - - - margin - 0 - - - spacing - 6 - - - - name - Spacer33 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - bigImg1 - - - minimumSize - - 200 - 94 - - - - scaledContents - true - - - - - name - Spacer34 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - - name - Spacer35 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - startLabel_h - - - alignment - AlignCenter - - - hAlign - - - - - name - Spacer34_3 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - startLabel_b - - - alignment - WordBreak|AlignVCenter|AlignLeft - - - vAlign - - - wordwrap - - - - - name - Spacer35_3 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - TextLabel2_5 - - - text - Press Next to continue - - - alignment - AlignCenter - - - hAlign - - - - - name - Spacer36 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - page1 - - - title - - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout16 - - - - margin - 0 - - - spacing - 6 - - - - name - Spacer37 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - bigImg2 - - - minimumSize - - 200 - 94 - - - - scaledContents - true - - - - - name - Spacer38 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - - name - Spacer16 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QGroupBox - - name - requestBox - - - title - Signing request - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout12 - - - - margin - 0 - - - spacing - 6 - - - QCheckBox - - name - fromReqCB - - - text - Sign this Certificate signing &request - - - - QComboBox - - name - reqList - - - whatsThis - A certificate signing request can be signed, even if the private key of the request is not available. This is the intention of a CSR: + + + + Sign this Certificate signing &request + + + + + + + A certificate signing request can be signed, even if the private key of the request is not available. This is the intention of a CSR: Getting signed by a CA certificate, whoes certificate of course must be in the database Of course you need the private key of the CSR if you want to create a self-signed cert from it. - - - - - - QCheckBox - - name - copyReqExtCB - - - text - Copy extensions from the request - - - - - - - name - Spacer70 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QButtonGroup - - name - signerBox - - - title - Signer - - - - margin - 11 - - - spacing - 6 - - - QRadioButton - - name - foreignSignRB - - - text - Use &this Certificate for for signing - - - - QRadioButton - - name - selfQASignRB - - - text - Create a &self signed certificate with a MD5-hashed QA serial - - - - QRadioButton - - name - selfSignRB - - - text - Create a &self signed certificate with the serial - - - checked - true - - - - QLineEdit - - name - serialNr - - - text - 1 - - - toolTip - If you leave this blank the serial 00 will be used - - - - QComboBox - - name - certList - - - enabled - false - - - toolTip - All certificates in your database that can create valid signatures - - - whatsThis - This list contains all certificates with the CA-flag set to true and whoes private key is present in the key-database. + + + + + + + + + Copy extensions from the request + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 16 + + + + + + + + Signer + + + + 8 + + + 6 + + + + + Create a &self signed certificate with a MD5-hashed QA serial + + + + + + + false + + + All certificates in your database that can create valid signatures + + + This list contains all certificates with the CA-flag set to true and whoes private key is present in the key-database. If this list is disabled, you only can create a self-signed certificate. - - - - - - - name - Spacer69 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QGroupBox - - name - templateBox - - - title - Template - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel2_3 - - - text - Template for the new certificate - - - - QComboBox - - name - tempList - - - sizePolicy - - 7 - 0 - - - - toolTip - All available templates - - - whatsThis - This list contains all templates from the toplevel template Tab. + + + + + + + Use &this Certificate for for signing + + + + + + + Create a &self signed certificate with the serial + + + true + + + + + + + If you leave this blank the serial 00 will be used + + + 1 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 16 + + + + + + + + Template + + + + 8 + + + 6 + + + + + + 7 + 0 + 0 + 0 + + + + All available templates + + + This list contains all templates from the toplevel template Tab. Additionally it contains 4 default templates: Empy, CA, client, server - - - - QCheckBox - - name - changeDefault - - - text - Change the default &extension settings from the template - - - checked - true - - - toolTip - Check this to adjust all details of the certificate - - - - - - - name - Spacer17 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - page2 - - - title - - - - - margin - 11 - - spacing - 6 + + + + + + Template for the new certificate - - QLayoutWidget - - name - Layout16_3 - - - - margin - 0 - - - spacing - 6 - - - - name - Spacer37_4 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - bigImg3 - - - minimumSize - - 200 - 94 - - - - scaledContents - true - - - - - name - Spacer38_4 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - - name - Spacer71 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QGroupBox - - name - GroupBox17 - - - title - Source of the subject - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout20 - - - - margin - 0 - - - spacing - 6 - - - QLineEdit - - name - emailAddress - - - maxLength - 60 - - - - QLabel - - name - TextLabel4_2_2 - - - text - Organisation - - - - QLineEdit - - name - description - - - maxLength - 100 - - - toolTip - This name is only used internally and does not appear in the resulting certificate - - - - QLineEdit - - name - countryName - - - maxLength - 2 - - - toolTip - Must be exactly 2 letter of size (DE, UK) - - - - QLineEdit - - name - commonName - - - maxLength - 64 - - - - QLabel - - name - TextLabel2_2 - - - text - Country code - - - - QLabel - - name - TextLabel3_2 - - - text - State or Province - - - - QLineEdit - - name - stateOrProvinceName - - - - QLabel - - name - TextLabel4_3 - - - text - Locality - - - - QLabel - - name - TextLabel5_2 - - - text - Organ. unit - - - - QLabel - - name - TextLabel6_2 - - - text - Common name - - - - QLabel - - name - TextLabel7_2 - - - text - E-Mail address - - - - QLineEdit - - name - localityName - - - - QLineEdit - - name - organisationalUnitName - - - - QLabel - - name - TextLabel1_3_2 - - - text - Internal name - - - - QLineEdit - - name - organisationName - - - - - - Line - - name - Line1 - - - orientation - Horizontal - - - - QLayoutWidget - - name - Layout23 - - - - margin - 0 - - - spacing - 6 - - - QComboBox - - name - extDNobj - - - - QLineEdit - - name - extDNname - - - maxLength - 100 - - - toolTip - This name is only used internally and does not appear in the resulting certificate - - - - QPushButton - - name - extDNadd - - - text - Add - - - - QPushButton - - name - extDNdel - - - text - Delete - - - - - - QListView - - - text - Object - - - clickable - true - - - resizeable - true - - - - - text - Value - - - clickable - true - - - resizeable - true - - - - name - extDNlist - - - - - - QGroupBox - - name - privKeyBox - - - title - Private key - - - - margin - 11 - - - spacing - 6 - - - QComboBox - - name - keyList - - - sizePolicy - - 7 - 0 - - - - toolTip - This list only contains unused keys - - - - QComboBox - - - text - MD 2 - - - - - text - MD 5 - - - - - text - SHA 1 - - - - name - hashAlgo - - - - - name - Spacer33_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - genKeyBUT - - - text - &Generate a new key - - - toolTip - This funny button creates a key. Go figure. - - - - - - - name - Spacer73 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - page4 - - - title - - - - - margin - 11 + + + + + + Check this to adjust all details of the certificate - - spacing - 6 + + Change the default &extension settings from the template - - QLayoutWidget - - name - Layout16_3_2 + + true + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 16 + + + + + + + + + Subject + + + + 8 + + + 6 + + + + + GroupBox + + + + 8 + + + 6 + + + + + + 0 + + + 6 + + + + + 60 + + + + + + + Organisation + + + + + + + This name is only used internally and does not appear in the resulting certificate + + + 100 + + + + + + + Must be exactly 2 letter of size (DE, UK) + + + 2 + + + + + + + 64 + + + + + + + Country code + + + + + + + State or Province + + + + + + + + + + Locality + + + + + + + Organ. unit + + + + + + + Common name + + + + + + + E-Mail address + + + + + + + + + + + + + Internal name + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + 0 + + + 6 + + + + + + + + This name is only used internally and does not appear in the resulting certificate + + + 100 + + + + + + + Add + + + + + + + Delete + + + + + + + + + + + + + + + + Private key + + + + 8 + + + 6 + + + + + This funny button creates a key. Go figure. + + + &Generate a new key + + + + + + + + MD 2 + + + + + MD 5 + + + + + SHA 1 + + + + + + + + + 7 + 0 + 0 + 0 + + + + This list only contains unused keys + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + + + + Extensions + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + Basic constrains + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + Type - - - margin - 0 - - - spacing - 6 - - - - name - Spacer37_4_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - bigImg4 - - - minimumSize - - 200 - 94 - - - - scaledContents - true - - - - - name - Spacer38_4_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - - name - Spacer33_3 + + + + + + If this will become a CA certificate or not - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLayoutWidget - - name - Layout15 - - - - margin - 0 - - - spacing - 6 - - - QGroupBox - - name - GroupBox1 - - - title - Basic Constraints - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel2_2_3 - - - text - Type - - - - QComboBox - - - text - Not defined - - - - - text - Certification Authority - - - - - text - End Entity - - - - name - basicCA - - - toolTip - If this will become a CA certificate or not - - - whatsThis - Set this to TRUE if you want to create a CA certificate that signs other certificates. + + Set this to TRUE if you want to create a CA certificate that signs other certificates. This is always set to FALSE for client or server certificates. In most cases self-signed certificates are CA certificates. Self-signed non-CA certificates are unusual although they are possible. - - - - QLabel - - name - TextLabel3_2_2 - - - text - Path length - - - - QLineEdit - - name - basicPath - - - toolTip - How much CAs may be below this. - - - whatsThis - If this is left empty the pathlen is not included in the certificate. Otherwise it distinguishes the count of chained CA certificates below this one. + + + + Not defined + + + + + Certification Authority + + + + + End Entity + + + + + + + + + + 0 + + + 6 + + + + + Path length + + + + + + + How much CAs may be below this. + + + If this is left empty the pathlen is not included in the certificate. Otherwise it distinguishes the count of chained CA certificates below this one. A pathlen of 0 means, that this certificate may not issue other sub-CA certificates. Although it can do it, all chain-checking algorithms in e.g. your browser or openssl will (should) fail. - - - - QCheckBox - - name - bcCritical - - - text - &Critical - - - toolTip - The basic constraints should always be critical - - - - - - QGroupBox - - name - GroupBox12 - - - title - Key identifier - - - - margin - 11 - - - spacing - 6 - - - QCheckBox - - name - subKey - - - text - &Subject Key Identifier - - - toolTip - Creates a hash of the key following the PKIX guidelines - - - - QCheckBox - - name - authKey - - - text - &Authority Key Identifier - - - toolTip - Copy the Subject Key Identifier from the issuer - - - whatsThis - If this box is checked an attempt is made to copy the subject key identifier from the signing certificate. + + + + + + + The basic constraints should always be critical + + + &Critical + + + + + + + + + + + + Key identifier + + + + 8 + + + 6 + + + + + Creates a hash of the key following the PKIX guidelines + + + &Subject Key Identifier + + + + + + + Copy the Subject Key Identifier from the issuer + + + If this box is checked an attempt is made to copy the subject key identifier from the signing certificate. It also copies the issuer and serial number from the issuer certificate. Normally this will only be done if the keyid option fails. - - - - - - - - QLayoutWidget - - name - Layout19 - - - - margin - 0 - - - spacing - 6 - - - QGroupBox - - name - validitybox - - - title - Validity - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout16 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1_2 - - - text - Not before - - - - QLabel - - name - TextLabel2_4 - - - text - Not after - - - - Validity - - name - notBefore - - - - Validity - - name - notAfter - - - - - - - - QGroupBox - - name - timeRangeBox - - - title - Time Range - - - - margin - 11 - - - spacing - 6 - - - QComboBox - - - text - Days - - - - - text - Months - - - - - text - Years - - - - name - validRange - - - - QPushButton - - name - applyTime - - - text - Apply - - - - QCheckBox - - name - midnightCB - - - text - Midnight - - - toolTip - Set the time to 00:00:00 and 23:59:59 respectively - - - - QLineEdit - - name - validNumber - - - - - - - - - name - Spacer35_2 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLayoutWidget - - name - Layout30 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1_2_3_2_2_3 - - - text - Authority Info Access - - - - QLabel - - name - TextLabel1_2_3_2_3 - - - text - CRL distribution point - - - - QLabel - - name - TextLabel1_2_2_2 - - - text - issuer alternative name - - - - QLineEdit - - name - crlDist - - - toolTip - URI: - - - whatsThis - This is a multi-valued extension that supports all the literal options of subject alternative name. Of the few software packages that currentlyi nterpret this extension most only interpret the URI option. + + + &Authority Key Identifier + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + 0 + + + 6 + + + + + Validity + + + + 8 + + + 6 + + + + + + + + + + + Not before + + + + + + + Not after + + + + + + + + + + Time range + + + + 8 + + + 6 + + + + + Apply + + + + + + + + Days + + + + + Months + + + + + Years + + + + + + + + Set the time to 00:00:00 and 23:59:59 respectively + + + Midnight + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + + + 6 + + + + + Authority Info Access + + + + + + + CRL distribution point + + + + + + + issuer alternative name + + + + + + + URI: + + + This is a multi-valued extension that supports all the literal options of subject alternative name. Of the few software packages that currentlyi nterpret this extension most only interpret the URI option. Currently each option will set a new DistributionPoint with the fullName field set to the given value. Other fields like cRLissuer and reasons cannot currently be set or displayed: at this time no examples were available that used these fields. -If you see this extension with <UNSUPPORTED> when you attempt to print it out or it doesn't appear to display correctly then let steve know, including the certificate (mail steve at openssl dot org) . +If you see this extension with <UNSUPPORTED> when you attempt to print it out or it doesn't appear to display correctly then let steve know, including the certificate (mail steve at openssl dot org) . Examples: URI:http://www.myhost.com/myca.crl URI:http://www.my.com/my.crl, URI:http://www.oth.com/my.crl - - - - QComboBox - - name - aiaOid - - - toolTip - can be altered by the file "aia.txt" - - - - QPushButton - - name - PushButton9 - - - text - Edit - - - - QPushButton - - name - PushButton10 - - - text - Edit - - - - QLineEdit - - name - authInfAcc - - - toolTip - DNS: IP: URI: email: RID: - - - whatsThis - The authority information access extension gives details about how to access certain information relating to the CA. Its syntax is accessOID;location where 'location' has the same syntax as subject alternative name (except that email:copy is not supported). accessOID can be any valid OID but only certain values are meaningful for example OCSP and caIssuers. OCSP gives the location of an OCSP responder: this is used by Netscape PSM and other software. + + + + + + + can be altered by the file "aia.txt" + + + + + + + Edit + + + + + + + Edit + + + + + + + DNS: IP: URI: email: RID: + + + The authority information access extension gives details about how to access certain information relating to the CA. Its syntax is accessOID;location where 'location' has the same syntax as subject alternative name (except that email:copy is not supported). accessOID can be any valid OID but only certain values are meaningful for example OCSP and caIssuers. OCSP gives the location of an OCSP responder: this is used by Netscape PSM and other software. Example: OCSP;URI:http://ocsp.my.host/ caIssuers;URI:http://my.ca/ca.html - - - - QLineEdit - - name - subAltName - - - toolTip - DNS: IP: URI: email: RID: - - - whatsThis - The subject alternative name extension allows various literal values to be used. These include "email" (an email address) , "URI" a uniform resource indicator, "DNS" (a DNS domain name) , RID (a registered ID: OBJECT IDENTIFIER) and IP (an IP address). + + + + + + + DNS: IP: URI: email: RID: + + + The subject alternative name extension allows various literal values to be used. These include "email" (an email address) , "URI" a uniform resource indicator, "DNS" (a DNS domain name) , RID (a registered ID: OBJECT IDENTIFIER) and IP (an IP address). Examples: email:my@other.address, IP: 1.1.1.1 , URI:http://my.url.here/ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld - - - - QPushButton - - name - PushButton11 - - - text - Edit - - - - QLabel - - name - TextLabel1_2_2 - - - text - subject alternative name - - - - QPushButton - - name - PushButton12 - - - text - Edit - - - - QLineEdit - - name - issAltName - - - toolTip - DNS: IP: URI: email: RID: - - - whatsThis - The issuer alternative name extension allows various literal values to be used. These include "email" (an email address) , "URI" a uniform resource indicator, "DNS" (a DNS domain name), RID (a registered ID: OBJECT IDENTIFIER) and IP (an IP address). + + + + + + + Edit + + + + + + + subject alternative name + + + + + + + Edit + + + + + + + DNS: IP: URI: email: RID: + + + The issuer alternative name extension allows various literal values to be used. These include "email" (an email address) , "URI" a uniform resource indicator, "DNS" (a DNS domain name), RID (a registered ID: OBJECT IDENTIFIER) and IP (an IP address). Examples: email:my@other.address, IP: 1.1.1.1 , URI:http://my.url.here/ email:my@other.address, RID:1.2.3.4, DNS: ns.server.tld - - - - - - - name - Spacer34_2 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - page5 - - - title - - - - QLayoutWidget - - name - Layout16_3_3 - - geometry - - 11 - 11 - 549 - 96 - - - - - margin - 0 - - - spacing - 6 - - - - name - Spacer37_4_3 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - bigImg5 - - - minimumSize - - 200 - 94 - - - - scaledContents - true - - - - - name - Spacer38_4_3 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - + + + - - - name - Spacer65 + + + + + + + Key Usage + + + + 8 + + + 6 + + + + + + + + 0 + + + 6 + + + + + GroupBox + + + + 8 - - orientation - Vertical + + 6 - - sizeType - Expanding + + + + &Critical + + + + + + + + Digital Signature + + + + + Non Repudiation + + + + + Key Encipherment + + + + + Data Encipherment + + + + + Key Agreement + + + + + Certificate Sign + + + + + CRL Sign + + + + + Encipher Only + + + + + Decipher Only + + + + + + + + + + + GroupBox + + + + 8 - - sizeHint - - 20 - 20 - + + 6 - - - QLayoutWidget - - name - Layout15 - - - geometry - - 10 - 140 - 549 - 210 - - - - - margin - 0 - - - spacing - 6 - - - QGroupBox - - name - GroupBox4 - - - title - Key Usage - - - - margin - 11 - - - spacing - 6 - - - QCheckBox - - name - kuCritical - - - text - &Critical - - - - QListBox - - - text - Digital Signature - - - - - text - Non Repudiation - - - - - text - Key Encipherment - - - - - text - Data Encipherment - - - - - text - Key Agreement - - - - - text - Certificate Sign - - - - - text - CRL Sign - - - - - text - Encipher Only - - - - - text - Decipher Only - - - - name - keyUsage - - - selectionMode - Multi - - - - - - QGroupBox - - name - GroupBox5 - - - title - Extended Key Usage - - - - margin - 11 - - - spacing - 6 - - - QCheckBox - - name - ekuCritical - - - text - C&ritical - - - - QListBox - - name - ekeyUsage - - - selectionMode - Multi - - - toolTip - can be altered by the file "eku.txt" - - - - - + + + + C&ritical + + + + + + + + + + + + + + + false + + + Certificate Policies + - - - name - Spacer66 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - name - Spacer67 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - TextLabel1_2_3_2_2_2_2 - - - enabled - false - - - geometry - - 12 - 419 - 120 - 24 - - - - text - Certificate Policies - - - - QLineEdit - - name - certPol - - - enabled - false - - - geometry - - 140 - 420 - 417 - 23 - - - - text - This will be enabled in a later version :-( - - - whatsThis - If you follow the PKIX recommendations of not including any qualifiers and just + + + + + false + + + If you follow the PKIX recommendations of not including any qualifiers and just using only one OID then you just include the value of that OID. Multiple OIDs can be set separated by commas, for example: Example: 1.2.4.5, 1.1.3.4 - + + + This will be enabled in a later version :-( + + + + + + + + Netscape + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + 0 + + + 6 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + + 0 + + + 6 + + + + + + 107 + 107 + + + + Great picture , heh ? + + + true + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + + + + + 0 + + + 6 + + + + + + + + + + + CA Revocation URL + + + + + + + + + + Revocation URL + + + + + + + SSL server name + + + + + + + + + + + + + Certificate renewal URL + + + + + + + Comment + + + + + + + CA policy URL + + + + + + + Base URL + + + + + + + + + + If you know a more pretty one tell me + + + + + + + + - - QWidget - - name - page6 - - - title - - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout18 - - - - margin - 0 - - - spacing - 6 - - - QListBox - - - text - SSL Client - - - - - text - SSL Server - - - - - text - S/MIME - - - - - text - Object Signing - - - - - text - SSL CA - - - - - text - S/MIME CA - - - - - text - Object Signing CA - - - - name - nsCertType - - - sizePolicy - - 7 - 7 - - - - selectionMode - Multi - - - - - name - Spacer37_3 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLayoutWidget - - name - Layout16 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - nsImg - - - minimumSize - - 107 - 107 - - - - scaledContents - true - - - toolTip - Great picture , heh ? - - - - - name - Spacer38_3 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - - - - name - Spacer39_2 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLayoutWidget - - name - Layout15 - - - - margin - 0 - - - spacing - 6 - - - QLineEdit - - name - nsRenewalUrl - - - - QLineEdit - - name - nsCaPolicyUrl - - - - QLabel - - name - TextLabel2 - - - text - CA Revocation URL - - - - QLineEdit - - name - nsSslServerName - - - - QLabel - - name - TextLabel4 - - - text - Revocation URL - - - - QLabel - - name - TextLabel7 - - - text - SSL server name - - - - QLineEdit - - name - nsBaseUrl - - - - QLineEdit - - name - nsCARevocationUrl - - - - QLabel - - name - TextLabel3 - - - text - Certificate renewal URL - - - - QLabel - - name - TextLabel8 - - - text - Comment - - - - QLabel - - name - TextLabel6 - - - text - CA policy URL - - - - QLabel - - name - TextLabel1 - - - text - Base URL - - - - QLineEdit - - name - nsRevocationUrl - - - - QLineEdit - - name - nsComment - - - toolTip - If you know a more pretty one tell me - - - - - - - name - Spacer40 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - page7 - - - title - - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout16_2 - - - - margin - 0 - - - spacing - 6 - - - - name - Spacer37_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - bigImg6 - - - minimumSize - - 200 - 94 - - - - scaledContents - true - - - - - name - Spacer38_2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - - name - Spacer43 - - - orientation - Vertical - - - sizeType - Minimum - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - endLabel - - - alignment - WordBreak|AlignVCenter|AlignLeft - - - wordwrap - - - - QTextView - - name - v3Extensions - - - palette - - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 237 - 237 - 237 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - 128 - 128 - 128 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 253 - 253 - 253 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 253 - 253 - 253 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - - - - name - Spacer44 - - - orientation - Vertical - - - sizeType - Minimum - - - sizeHint - - 20 - 20 - - - - - - - - - Validity -
widgets/validity.h
- - -1 - -1 - - 1 + + + + + 0 + + + 6 + + + + - 7 - 7 + 7 + 0 + 0 + 0 - image0 -
-
- - - image0 - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - - - - description - textChanged(const QString&) - NewX509_UI - dataChangeP2() - - - changeDefault - stateChanged(int) - NewX509_UI - switchExtended() - - - tempList - activated(int) - NewX509_UI - templateChanged() - - - fromReqCB - clicked() - NewX509_UI - toggleFromRequest() - - - selfSignRB - toggled(bool) - serialNr - setEnabled(bool) - - - foreignSignRB - toggled(bool) - certList - setEnabled(bool) - - - certList - activated(int) - NewX509_UI - signerChanged() - - - foreignSignRB - clicked() - NewX509_UI - signerChanged() - - - countryName - textChanged(const QString&) - NewX509_UI - dataChangeP2() - - - NewX509_UI - helpClicked() - NewX509_UI - helpClicked() - - - subKey - clicked() - NewX509_UI - checkAuthKeyId() - - - applyTime - clicked() - NewX509_UI - applyTimeDiff() - - - keyList - activated(const QString&) - NewX509_UI - keyChanged(const QString &) - - - keyList - activated(int) - NewX509_UI - dataChangeP2() - - - PushButton9 - clicked() - NewX509_UI - editSubAltName() - - - PushButton10 - clicked() - NewX509_UI - editIssAltName() - - - PushButton11 - clicked() - NewX509_UI - editCrlDist() - - - PushButton12 - clicked() - NewX509_UI - editAuthInfAcc() - - applyTimeDiff() - checkAuthKeyId() - dataChangeP2() - editCrlDist() - editIssAltName() - editSubAltName() - helpClicked() - keyChanged(const QString &) - editAuthInfAcc() - signerChanged() - switchExtended() - templateChanged() - toggleFromRequest() - - - fromReqCB - reqList - selfSignRB - serialNr - certList - tempList - changeDefault - description - countryName - stateOrProvinceName - localityName - organisationName - organisationalUnitName - commonName - emailAddress - extDNobj - extDNname - extDNadd - extDNdel - extDNlist - keyList - hashAlgo - genKeyBUT - basicCA - basicPath - bcCritical - subKey - authKey - validNumber - validRange - applyTime - subAltName - issAltName - kuCritical - keyUsage - ekuCritical - ekeyUsage - nsCertType - nsBaseUrl - nsRevocationUrl - nsCARevocationUrl - nsRenewalUrl - nsCaPolicyUrl - nsSslServerName - nsComment - v3Extensions - -
+ + + Cancel + + + + + + + Qt::Horizontal + + + + 311 + 31 + + + + + + + + + 3 + 0 + 0 + 0 + + + + OK + + + + + + + + + + + Validity + +
widgets/validity.h
+ 1 + +
+
+ + + + okButton + clicked() + NewX509 + accept() + + + 278 + 253 + + + 96 + 254 + + + + + cancelButton + clicked() + NewX509 + reject() + + + 369 + 253 + + + 179 + 282 + + + + + diff --git a/ui/PassRead.ui b/ui/PassRead.ui index 4f451b0d..8ad8834c 100644 --- a/ui/PassRead.ui +++ b/ui/PassRead.ui @@ -1,288 +1,252 @@ - -PassRead_UI - - QDialog - - name - PassRead_UI - - - geometry - - 0 - 0 - 472 - 184 - - - - caption + + + + + PassRead + + + + 0 + 0 + 339 + 192 + + + + Password + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + + Arial + 14 + 50 + false + false + false + false + + + Password - - - - margin - 11 + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 95 + 40 + + + + + 95 + 40 + + + + true + + + + + + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + + Sans Serif + 9 + 50 + false + false + false + false + + + + + + + false + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 8 + + + 6 + + + + + Password - - spacing - 6 + + + + + + QLineEdit::Password - - QLayoutWidget - - name - Layout16 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - title - - - font - - 14 - 1 - 1 - - - - text - Password - - - - - name - Spacer4 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - scaledContents - true - - - - - - QLabel - - name - description - - - minimumSize - - 0 - 0 - - - - maximumSize - - 32767 - 32767 - - - - font - - - - - text - - - - scaledContents - false - - - alignment - AlignVCenter|AlignLeft - - - wordwrap - - - - QFrame - - name - Frame22 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel1 - - - text - Password - - - - QLineEdit - - name - pass - - - echoMode - Password - - - - - - QLayoutWidget - - name - Layout12 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - PushButton2 - - - text - &Cancel - - - - - name - Spacer1 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton1 - - - text - &OK - - - - - - - - - PushButton1 - clicked() - PassRead_UI - accept() - - - PushButton2 - clicked() - PassRead_UI - reject() - - - pass - returnPressed() - PassRead_UI - accept() - - - - pass - PushButton1 - PushButton2 - - + + + + + + + + + 0 + + + 6 + + + + + &Cancel + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + &OK + + + + + + + + + + pass + PushButton1 + PushButton2 + + + + + pass + returnPressed() + PassRead + accept() + + + 148 + 123 + + + 158 + 157 + + + + + PushButton1 + clicked() + PassRead + accept() + + + 307 + 172 + + + 258 + 162 + + + + + PushButton2 + clicked() + PassRead + reject() + + + 28 + 167 + + + 110 + 161 + + + + + diff --git a/ui/PassWrite.ui b/ui/PassWrite.ui index 2e66e0a0..c21b93e9 100644 --- a/ui/PassWrite.ui +++ b/ui/PassWrite.ui @@ -1,340 +1,267 @@ - -PassWrite_UI - - QDialog - - name - PassWrite_UI - - - geometry - - 0 - 0 - 474 - 236 - - - - caption + + + + + PassWrite + + + + 0 + 0 + 474 + 243 + + + + Password + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + + Arial + 14 + 50 + false + false + false + false + + + Password - - - - margin - 11 + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 95 + 40 + + + + + 95 + 40 + + + + true + + + + + + + + + + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + 8 + + + 6 + + + + + + 0 + 0 + - - spacing - 6 + + + 32767 + 32767 + - - QLayoutWidget - - name - Layout4 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - title - - - font - - 14 - 1 - 1 - - - - frameShape - MShape - - - frameShadow - MShadow - - - text - Password - - - - - name - Spacer4 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - scaledContents - true - - - - - - QLabel - - name - description - - - text - - - - alignment - WordBreak|AlignVCenter|AlignLeft - - - wordwrap - - - - QFrame - - name - Frame3 - - - frameShape - Box - - - frameShadow - Sunken - - - - margin - 11 - - - spacing - 6 - - - QLabel - - name - TextLabel2 - - - minimumSize - - 0 - 0 - - - - maximumSize - - 32767 - 32767 - - - - font - - - - - frameShape - MShape - - - frameShadow - MShadow - - - text - Repeat password - - - scaledContents - false - - - - QLabel - - name - TextLabel1 - - - text - Password - - - alignment - AlignVCenter|AlignLeft - - - wordwrap - - - - QLineEdit - - name - passB - - - echoMode - Password - - - - QLineEdit - - name - passA - - - echoMode - Password - - - - - - QLayoutWidget - - name - Layout15 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - PushButton2 - - - text - &Cancel - - - - - name - Spacer2 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton1 - - - text - &OK - - - - - - - - - PushButton1 - clicked() - PassWrite_UI - accept() - - - PushButton2 - clicked() - PassWrite_UI - reject() - - - passA - returnPressed() - passB - setFocus() - - - passB - returnPressed() - PassWrite_UI - accept() - - - - passA - passB - PushButton1 - PushButton2 - - + + + + 9 + 50 + false + false + false + false + + + + Repeat password + + + false + + + + + + + QLineEdit::Password + + + + + + + QLineEdit::Password + + + + + + + Password + + + + + + + + + + 0 + + + 6 + + + + + &Cancel + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + &OK + + + + + + + + + + passA + passB + PushButton1 + PushButton2 + + + + + PushButton1 + clicked() + PassWrite + accept() + + + 442 + 212 + + + 379 + 212 + + + + + PushButton2 + clicked() + PassWrite + reject() + + + 45 + 209 + + + 170 + 207 + + + + + passB + returnPressed() + PassWrite + accept() + + + 207 + 178 + + + 252 + 42 + + + + + diff --git a/ui/ReqDetail.ui b/ui/ReqDetail.ui index 9ef6f82a..35a4e386 100644 --- a/ui/ReqDetail.ui +++ b/ui/ReqDetail.ui @@ -1,977 +1,623 @@ - -ReqDetail_UI - - QDialog - - name - ReqDetail_UI - - - geometry - - 0 - 0 - 502 - 374 - - - - caption - ReqDetail_UI - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout12 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1 - - - font - - 14 - 1 - 1 - - - - text - Details of the certificate signing request - - - - - name - Spacer5 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - scaledContents - true - - - - + + + + + ReqDetail + + + + 0 + 0 + 511 + 376 + + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + + Arial + 14 + 50 + false + false + false + false + + + + Details of the certificate signing request + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 95 + 40 + + + + + 95 + 40 + + + + true + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 493 + 16 + + + + + + + + + S&tatus + + + + 8 + + + 6 + + - - name - Spacer14 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + - - QTabWidget - - name - TabWidget3 - - - QWidget - - name - unnamed - - - title - S&tatus - - - - margin - 11 - - - spacing - 6 - - - - name - Spacer6_2 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLayoutWidget - - name - Layout3 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel2 - - - text - Internal Name - - - - ClickLabel - - name - verify - - - - ClickLabel - - name - privKey - - - - QLineEdit - - name - sigAlgo - - - palette - - - - 0 - 0 - 0 - - - 192 - 192 - 192 - - - 255 - 255 - 255 - - - 223 - 223 - 223 - - - 128 - 128 - 128 - - - 160 - 160 - 164 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 192 - 192 - 192 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 255 - 255 - 255 - - - 223 - 223 - 223 - - - 128 - 128 - 128 - - - 160 - 160 - 164 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 192 - 192 - 192 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - - - 0 - 0 - 0 - - - 192 - 192 - 192 - - - 255 - 255 - 255 - - - 223 - 223 - 223 - - - 128 - 128 - 128 - - - 160 - 160 - 164 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 192 - 192 - 192 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - - - - - QLineEdit - - name - descr - - - toolTip - Internal name of the PKCS#10 signing request - - - - QLabel - - name - TextLabel6 - - - text - Private key - - - - QLabel - - name - TextLabel1_2 - - - text - Signature algorithm - - - - QLabel - - name - TextLabel4 - - - text - Signature - - - - - - - name - Spacer7 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - tab - - - title - &Subject - - - - margin - 11 - - - spacing - 6 - - - - name - Spacer8 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - DistName - - name - subject - - - sizePolicy - - 7 - 7 - - - - - - name - Spacer9 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - - - QWidget - - name - tab - - - title - &Extensions - - - - margin - 11 - - - spacing - 6 - - - QTextView - - name - v3extensions - - - palette - - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 237 - 237 - 237 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - 128 - 128 - 128 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 253 - 253 - 253 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 255 - 255 - 255 - - - 253 - 253 - 253 - - - 110 - 110 - 110 - - - 146 - 146 - 146 - - - 0 - 0 - 0 - - - 255 - 255 - 255 - - - 0 - 0 - 0 - - - 220 - 220 - 220 - - - 220 - 220 - 220 - - - 0 - 0 - 0 - - - 84 - 112 - 152 - - - 255 - 255 - 255 - - - - - - - - + + + + + 0 + + + 6 + + + + + Internal Name + + + + + + + + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 255 + 255 + 255 + + + 223 + 223 + 223 + + + 128 + 128 + 128 + + + 160 + 160 + 164 + + + 128 + 128 + 128 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 192 + 192 + 192 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 255 + + + 255 + 0 + 255 + + + 231 + 231 + 231 + + + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 255 + 255 + 255 + + + 223 + 223 + 223 + + + 128 + 128 + 128 + + + 160 + 160 + 164 + + + 128 + 128 + 128 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 192 + 192 + 192 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 255 + + + 255 + 0 + 255 + + + 231 + 231 + 231 + + + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 255 + 255 + 255 + + + 223 + 223 + 223 + + + 128 + 128 + 128 + + + 160 + 160 + 164 + + + 128 + 128 + 128 + + + 255 + 255 + 255 + + + 128 + 128 + 128 + + + 192 + 192 + 192 + + + 192 + 192 + 192 + + + 0 + 0 + 0 + + + 0 + 0 + 128 + + + 255 + 255 + 255 + + + 0 + 0 + 255 + + + 255 + 0 + 255 + + + 231 + 231 + 231 + + + + + + + + + + Internal name of the PKCS#10 signing request + + + + + + + Private key + + + + + + + Signature algorithm + + + + + + + Signature + + + + + + + + + + + + - - name - Spacer12 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 20 + + - - QLayoutWidget - - name - Layout18 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - but_cancel - - - text - &Cancel - - - - - name - Spacer6 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - but_ok - - - text - &OK - - - + + + + + + &Subject + + + + 8 + + + 6 + + + + + + 13 + 13 + 0 + 0 + + - - - - - DistName -
distname.h
- - -1 - -1 - - 1 + + + + + + &Extensions + + + + 8 + + + 6 + + + + + true + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 493 + 16 + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 141 + 29 + + + + + + + - 7 - 7 + 3 + 0 + 0 + 0 - image0 -
- - ClickLabel -
clicklabel.h
- - 100 - 26 - - 0 - - 7 - 0 - - image0 -
-
- - - image0 - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - - - - but_ok - clicked() - ReqDetail_UI - accept() - - - but_cancel - clicked() - ReqDetail_UI - reject() - - -
+ + + &OK + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + DistName + QWidget +
widgets/distname.h
+ 0 + +
+ + ClickLabel + QWidget +
widgets/clicklabel.h
+ 0 + +
+
+ + + + but_ok + clicked() + ReqDetail + accept() + + + 291 + 347 + + + 73 + 318 + + + + + diff --git a/ui/TrustState.ui b/ui/TrustState.ui index 4709d2a6..b8457d33 100644 --- a/ui/TrustState.ui +++ b/ui/TrustState.ui @@ -1,325 +1,258 @@ - -TrustState_UI - - QDialog - - name - TrustState_UI + + + + + TrustState_UI + + + TrustState_UI - - geometry - - 0 - 0 - 455 - 267 - + + + 0 + 0 + 455 + 267 + - - caption - + + - - - margin - 11 - - - spacing + + + 11 + + + 6 + + + + + 0 + + 6 - - - QLayoutWidget - - name - Layout4 - - - - margin - 0 - - - spacing - 6 - - - QLabel - - name - TextLabel1 - - - font - - 14 - 1 - 1 - - - - text - Set Trustment of the Certificate - - - - - name - Spacer1 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QLabel - - name - image - - - minimumSize - - 95 - 40 - - - - maximumSize - - 95 - 40 - - - - text - - - - scaledContents - true - - - alignment - AlignVCenter|AlignLeft - - - wordwrap - - - - - - - name - Spacer15 - - - orientation - Vertical - - - sizeType - Expanding - - - sizeHint + + + + + TextLabel1 + + + + + 14 + 0 + false + false + false + false + + + + Set Trustment of the Certificate + + + + + + - 20 - 20 + 20 + 20 - - - - ClickLabel - - name - certName - - - - - name - Spacer5 - - - orientation - Vertical - - - sizeType + + Expanding - - - sizeHint + + + Horizontal + + + + + + + image + + - 20 - 20 + 95 + 40 - + + + + 95 + 40 + + + + + + + true + + + + + + + + + + 20 + 20 + + + + Expanding + + + Vertical + - - QButtonGroup - - name - ButtonGroup2 - - - title - Select the Truststate - - - - margin - 11 - - - spacing - 6 - - - QRadioButton - - name - trust0 - - - text - &Never trust this certificate - - - - QRadioButton - - name - trust1 - - - text - Only &trust this certificate, if we trust the signer - - - - QRadioButton - - name - trust2 - - - text - &Always trust this certificate - - - + + + + + certName + - - QLayoutWidget - - name - Layout22 + + + + + + 20 + 20 + + + + Expanding + + + Vertical + + + + + + + ButtonGroup2 + + + Select the Truststate + + + + 11 - - - margin - 0 + + 6 + + + + + trust0 - - spacing - 6 + + &Never trust this certificate - - QPushButton - - name - PushButton5 - - - text - &Cancel - - - - - name - Spacer4 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton4 - - - text - &OK - - - + + + + + + trust1 + + + Only &trust this certificate, if we trust the signer + + + + + + + trust2 + + + &Always trust this certificate + + + + - - - + + + + + 0 + + + 6 + + + + + PushButton5 + + + &Cancel + + + + + + + + 20 + 20 + + + + Expanding + + + Horizontal + + + + + + + PushButton4 + + + &OK + + + + + + + + + - ClickLabel -
clicklabel.h
- - 100 - 26 - - 0 - - 7 - 0 - - image0 + ClickLabel + +
clicklabel.h
+ + 100 + 26 + + 0 + + 7 + 0 + + image0
-
- - - image0 - 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 +
+ + + 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - - - PushButton4 - clicked() - TrustState_UI - accept() - - - PushButton5 - clicked() - TrustState_UI - reject() - - -
+ + diff --git a/ui/v3ext.ui b/ui/v3ext.ui index 2e95ddbc..1c1c6e44 100644 --- a/ui/v3ext.ui +++ b/ui/v3ext.ui @@ -1,200 +1,110 @@ - -v3ext_UI - - QDialog - - name - v3ext_UI - - - geometry - - 0 - 0 - 499 - 255 - - - - caption - Form1 - - - - margin - 11 - - - spacing - 6 - - - QLayoutWidget - - name - Layout1 - - - - margin - 0 - - - spacing - 6 - - - QComboBox - - name - type - - - - QLineEdit - - name - value - - - - QPushButton - - name - buttonAdd - - - text - Add - - - - QPushButton - - name - buttonDelete - - - text - Delete - - - - - - QListView - - name - listView - - - - QLayoutWidget - - name - Layout3 - - - - margin - 0 - - - spacing - 6 - - - QPushButton - - name - PushButton3 - - - text - Apply - - - - QPushButton - - name - PushButton5 - - - text - Validate - - - - - name - Spacer1 - - - orientation - Horizontal - - - sizeType - Expanding - - - sizeHint - - 20 - 20 - - - - - QPushButton - - name - PushButton4 - - - text - Cancel - - - - - - - - - buttonAdd - clicked() - v3ext_UI - addEntry() - - - buttonDelete - clicked() - v3ext_UI - delEntry() - - - PushButton4 - clicked() - v3ext_UI - reject() - - - PushButton3 - clicked() - v3ext_UI - apply() - - - PushButton5 - clicked() - v3ext_UI - validate() - - addEntry() - apply() - delEntry() - validate() - - + + + + + v3ext + + + + 0 + 0 + 316 + 181 + + + + Form1 + + + + 8 + + + 6 + + + + + 0 + + + 6 + + + + + + + + + + + Add + + + + + + + Delete + + + + + + + + + + + + 0 + + + 6 + + + + + Apply + + + + + + + Validate + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + Cancel + + + + + + + + qPixmapFromMimeSource + + + diff --git a/view/CertView.cpp b/view/CertView.cpp index 27bbc863..2280ef05 100644 --- a/view/CertView.cpp +++ b/view/CertView.cpp @@ -52,16 +52,16 @@ #include "CertView.h" #include "widgets/MainWindow.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "widgets/CertExtend.h" #include "widgets/ExportCert.h" #include "widgets/CertDetail.h" @@ -83,7 +83,7 @@ #include #endif -CertView::CertView(QWidget * parent, const char * name, WFlags f) +CertView::CertView(QWidget * parent, const char * name, Qt::WFlags f) :XcaListView(parent, name, f) { addColumn(tr("Internal name")); @@ -158,7 +158,7 @@ void CertView::newCert(NewX509 *dlg) else { // A PKCS#10 Request was selected req = dlg->getSelectedReq(); - if (Error(req)) return; + if (Qt::SocketError(req)) return; clientkey = req->getRefKey(); if (clientkey == NULL) { clientkey = req->getPubKey(); @@ -177,7 +177,7 @@ void CertView::newCert(NewX509 *dlg) // Step 2 - select Signing if (dlg->foreignSignRB->isChecked()) { signcert = dlg->getSelectedSigner(); - if (Error(signcert)) return; + if (Qt::SocketError(signcert)) return; serial = signcert->getIncCaSerial(); signkey = signcert->getRefKey(); cert->setTrust(1); @@ -289,7 +289,7 @@ void CertView::newCert(NewX509 *dlg) } // EOF try catch (errorEx &err) { - Error(err); + Qt::SocketError(err); delete cert; if (tempkey != NULL) delete(tempkey); } @@ -341,7 +341,7 @@ void CertView::extendCert() delete dlg; } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); if (newcert) delete newcert; } @@ -363,7 +363,7 @@ void CertView::showItem(pki_base *item, bool import) dlg->exec(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } if (dlg) delete dlg; @@ -384,7 +384,7 @@ void CertView::deleteItem() deleteItem_default(tr("The certificate"), tr("is going to be deleted")); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -476,7 +476,7 @@ void CertView::store() } } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } delete dlg; } @@ -508,7 +508,7 @@ void CertView::writePKCS12(QString s, bool chain) delete p12; } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -551,7 +551,7 @@ void CertView::writePKCS7(QString s, int type) p7->writeP7(s, false); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } if (p7 != NULL ) delete p7; @@ -573,10 +573,10 @@ void CertView::signP7() filt.append("All Files ( *.* )"); QString s=""; QStringList slist; - QFileDialog *dlg = new QFileDialog(this,0,true); + Q3FileDialog *dlg = new Q3FileDialog(this,0,true); dlg->setCaption(tr("Import Certificate signing request")); dlg->setFilters(filt); - dlg->setMode( QFileDialog::ExistingFiles ); + dlg->setMode( Q3FileDialog::ExistingFiles ); dlg->setDir(MainWindow::getPath()); if (dlg->exec()) { slist = dlg->selectedFiles(); @@ -593,7 +593,7 @@ void CertView::signP7() delete p7; } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -613,10 +613,10 @@ void CertView::encryptP7() filt.append("All Files ( *.* )"); QString s=""; QStringList slist; - QFileDialog *dlg = new QFileDialog(this,0,true); + Q3FileDialog *dlg = new Q3FileDialog(this,0,true); dlg->setCaption(tr("Import Certificate signing request")); dlg->setFilters(filt); - dlg->setMode( QFileDialog::ExistingFiles ); + dlg->setMode( Q3FileDialog::ExistingFiles ); dlg->setDir(MainWindow::getPath()); if (dlg->exec()) { slist = dlg->selectedFiles(); @@ -633,15 +633,15 @@ void CertView::encryptP7() delete p7; } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } -void CertView::popupMenu(QListViewItem *item, const QPoint &pt, int x) { - QPopupMenu *menu = new QPopupMenu(this); - QPopupMenu *subCa = new QPopupMenu(this); - QPopupMenu *subP7 = new QPopupMenu(this); - QPopupMenu *subExport = new QPopupMenu(this); +void CertView::popupMenu(Q3ListViewItem *item, const QPoint &pt, int x) { + Q3PopupMenu *menu = new Q3PopupMenu(this); + Q3PopupMenu *subCa = new Q3PopupMenu(this); + Q3PopupMenu *subP7 = new Q3PopupMenu(this); + Q3PopupMenu *subExport = new Q3PopupMenu(this); int itemExtend, itemRevoke, itemTrust, itemCA, itemTemplate, itemReq, itemP7, itemtca; bool canSign, parentCanSign, hasTemplates, hasPrivkey; @@ -748,7 +748,7 @@ void CertView::toRequest() MainWindow::reqs->insert(req); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -791,7 +791,7 @@ void CertView::setSerial() } } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -983,7 +983,7 @@ void CertView::updateView() setRootIsDecorated(true); pki_x509 *pki, *signer; pki_base *pkib; - QListViewItem *parentitem, *current; + Q3ListViewItem *parentitem, *current; QList container = db->getContainer(); if ( container.isEmpty() ) return; QList mycont = container; @@ -1001,10 +1001,10 @@ void CertView::updateView() || viewState == 0) && (pki->getLvi() == NULL )) { // create the listview item if (parentitem != NULL) { - current = new QListViewItem(parentitem); + current = new Q3ListViewItem(parentitem); } else { - current = new QListViewItem(this); + current = new Q3ListViewItem(this); } pki->setLvi(current); mycont.remove(pki); @@ -1076,7 +1076,7 @@ void CertView::showKey(pki_key *key) dlg->exec(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } if (dlg) delete dlg; diff --git a/view/CertView.h b/view/CertView.h index c20efb8b..b03d0c04 100644 --- a/view/CertView.h +++ b/view/CertView.h @@ -62,7 +62,7 @@ class pki_pkcs12; class NewX509; class pki_base; -class QListViewItem; +class Q3ListViewItem; class pki_x509req; class pki_temp; @@ -75,7 +75,7 @@ class CertView : public XcaListView bool mkDir(QString dir); public: - CertView(QWidget * parent = 0, const char * name = 0, WFlags f=0); + CertView(QWidget * parent = 0, const char * name = 0, Qt::WFlags f=0); void showItem(pki_base *item, bool import); void newItem(); void deleteItem(); @@ -83,7 +83,7 @@ class CertView : public XcaListView void load(); // pki_base* insert(pki_base *item); void store(); - void popupMenu(QListViewItem *item, const QPoint &pt, int x); + void popupMenu(Q3ListViewItem *item, const QPoint &pt, int x); void newCert(NewX509 *dlg); void writePKCS12(QString s, bool chain); void writePKCS7(QString s, int type); diff --git a/view/CrlView.cpp b/view/CrlView.cpp index 1ef3c506..27f0063d 100644 --- a/view/CrlView.cpp +++ b/view/CrlView.cpp @@ -51,9 +51,9 @@ #include "CrlView.h" -#include -#include -#include +#include +#include +#include #include "widgets/CrlDetail.h" #include "widgets/KeyDetail.h" #include "widgets/CertDetail.h" @@ -61,7 +61,7 @@ #include "widgets/MainWindow.h" #include "widgets/clicklabel.h" -CrlView::CrlView(QWidget * parent, const char * name, WFlags f) +CrlView::CrlView(QWidget * parent, const char * name, Qt::WFlags f) :XcaListView(parent, name, f) { addColumn(tr("Internal Name")); @@ -70,7 +70,7 @@ CrlView::CrlView(QWidget * parent, const char * name, WFlags f) } -void CrlView::showCert(QListViewItem *i) +void CrlView::showCert(Q3ListViewItem *i) { showCert(i->text(0)); } @@ -92,7 +92,7 @@ void CrlView::showCert(QString name) dlg->exec(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } if (dlg) delete dlg; @@ -111,7 +111,7 @@ void CrlView::showKey(QString name) dlg->exec(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } if (dlg) delete dlg; @@ -125,15 +125,15 @@ void CrlView::showItem(pki_base *item, bool import) try { dlg = new CrlDetail(this,0,true); dlg->setCrl((pki_crl *)item); - connect( dlg->certList, SIGNAL( doubleClicked(QListViewItem*) ), - this, SLOT( showCert(QListViewItem *) )); + connect( dlg->certList, SIGNAL( doubleClicked(Q3ListViewItem*) ), + this, SLOT( showCert(Q3ListViewItem *) )); connect( dlg->issuerIntName, SIGNAL( doubleClicked(QString) ), this, SLOT( showCert(QString) )); dlg->exec(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } if (dlg) delete dlg; @@ -171,7 +171,7 @@ void CrlView::store(bool pem) crl = (pki_crl *)getSelected(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); return; } @@ -180,10 +180,10 @@ void CrlView::store(bool pem) filt.append("Revocation Lists ( *.crl *.pem)"); filt.append("All Files ( *.* )"); QString s=""; - QFileDialog *dlg = new QFileDialog(this,0,true); + Q3FileDialog *dlg = new Q3FileDialog(this,0,true); dlg->setCaption(tr("Export Certificate revokation list")); dlg->setFilters(filt); - dlg->setMode( QFileDialog::AnyFile ); + dlg->setMode( Q3FileDialog::AnyFile ); dlg->setSelection( (crl->getIntName() + ".crl") ); dlg->setDir(MainWindow::getPath()); @@ -198,15 +198,15 @@ void CrlView::store(bool pem) crl->writeCrl(s.latin1(), pem); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } -void CrlView::popupMenu(QListViewItem *item, const QPoint &pt, int x) { - QPopupMenu *menu = new QPopupMenu(this); - QPopupMenu *subExport = new QPopupMenu(this); +void CrlView::popupMenu(Q3ListViewItem *item, const QPoint &pt, int x) { + Q3PopupMenu *menu = new Q3PopupMenu(this); + Q3PopupMenu *subExport = new Q3PopupMenu(this); if (!item) { menu->insertItem(tr("Import"), this, SLOT(load())); @@ -270,7 +270,7 @@ pki_crl *CrlView::newItem(pki_x509 *cert) updateView(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } return crl; } diff --git a/view/CrlView.h b/view/CrlView.h index 7be2bf32..fcdab89c 100644 --- a/view/CrlView.h +++ b/view/CrlView.h @@ -56,7 +56,7 @@ #include "XcaListView.h" class pki_crl; -class QListViewItem; +class Q3ListViewItem; class CrlView : public XcaListView { @@ -66,13 +66,13 @@ class CrlView : public XcaListView static const int sizeList[]; public: - CrlView(QWidget * parent = NULL, const char * name = 0, WFlags f = 0); + CrlView(QWidget * parent = NULL, const char * name = 0, Qt::WFlags f = 0); void showItem(pki_base *item, bool import); void deleteItem(); void load(); pki_base *loadItem(QString fname); void store(bool); - void popupMenu(QListViewItem *item, const QPoint &pt, int x); + void popupMenu(Q3ListViewItem *item, const QPoint &pt, int x); public slots: pki_crl *newItem(pki_x509 *cert); @@ -80,7 +80,7 @@ class CrlView : public XcaListView void writeCrl_der(); private slots: - void showCert(QListViewItem *i); + void showCert(Q3ListViewItem *i); void showCert(QString name); void showKey(QString name); }; diff --git a/view/KeyView.cpp b/view/KeyView.cpp index e82db1a4..b6a9c47c 100644 --- a/view/KeyView.cpp +++ b/view/KeyView.cpp @@ -58,19 +58,19 @@ #include "widgets/MainWindow.h" #include "widgets/clicklabel.h" #include "lib/pki_key.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include const int KeyView::sizeList[] = {512, 1024, 2048, 4096, 0 }; -KeyView::KeyView(QWidget * parent, const char * name, WFlags f) +KeyView::KeyView(QWidget * parent, const char * name, Qt::WFlags f) :XcaListView(parent, name, f) { addColumn(tr("Internal name")); @@ -110,7 +110,7 @@ void KeyView::newItem() emit keyDone(x); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } delete dlg; @@ -133,7 +133,7 @@ void KeyView::showItem(pki_base *item, bool import) dlg->exec(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } if (dlg) delete dlg; @@ -181,15 +181,15 @@ void KeyView::store() } } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } delete dlg; } -void KeyView::popupMenu(QListViewItem *item, const QPoint &pt, int x) { - QPopupMenu *menu = new QPopupMenu(this); +void KeyView::popupMenu(Q3ListViewItem *item, const QPoint &pt, int x) { + Q3PopupMenu *menu = new Q3PopupMenu(this); if (!item) { menu->insertItem(tr("New Key"), this, SLOT(newItem())); menu->insertItem(tr("Import"), this, SLOT(load())); @@ -220,7 +220,7 @@ void KeyView::setOwnPass() __setOwnPass(1); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -230,7 +230,7 @@ void KeyView::resetOwnPass() __setOwnPass(0); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -306,9 +306,9 @@ void KeyView::changePasswd() tid->abort(); strncpy(pki_key::passwd, B.latin1(), MAX_PASS_LENGTH); errorEx er(e); - Error(er); + Qt::SocketError(er); } tid->commit(0); QMessageBox::information(this, XCA_TITLE, tr("Database password changed successfully.") ); } - + diff --git a/view/KeyView.h b/view/KeyView.h index c1f535c3..c1e0910a 100644 --- a/view/KeyView.h +++ b/view/KeyView.h @@ -65,14 +65,14 @@ class KeyView : public XcaListView static const int sizeList[]; void __setOwnPass(int x); public: - KeyView(QWidget * parent = 0, const char * name = 0, WFlags f = 0); + KeyView(QWidget * parent = 0, const char * name = 0, Qt::WFlags f = 0); void showItem(pki_base *item, bool import); void newItem(); void deleteItem(); void load(); // pki_base *insert(pki_base *item); void store(); - void popupMenu(QListViewItem *item, const QPoint &pt, int x); + void popupMenu(Q3ListViewItem *item, const QPoint &pt, int x); public slots: void importKey(pki_key *k); void changePasswd(); diff --git a/view/ReqView.cpp b/view/ReqView.cpp index 00f9eb42..6ab0165b 100644 --- a/view/ReqView.cpp +++ b/view/ReqView.cpp @@ -54,14 +54,14 @@ #include "widgets/ReqDetail.h" #include "widgets/KeyDetail.h" #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "widgets/MainWindow.h" #include "widgets/NewX509.h" @@ -69,7 +69,7 @@ #include "widgets/clicklabel.h" -ReqView::ReqView(QWidget * parent, const char * name, WFlags f) +ReqView::ReqView(QWidget * parent, const char * name, Qt::WFlags f) :XcaListView(parent, name, f) { addColumn(tr("Internal name")); @@ -111,7 +111,7 @@ void ReqView::newItem(pki_temp *temp) } catch (errorEx &err) { delete req; - Error(err); + Qt::SocketError(err); } } @@ -129,7 +129,7 @@ void ReqView::showItem(pki_base *item, bool import) dlg->exec(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } if (dlg) delete dlg; @@ -157,7 +157,7 @@ void ReqView::store(bool pem) req = (pki_x509req *)getSelected(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); return; } @@ -166,10 +166,10 @@ void ReqView::store(bool pem) filt.append("PKCS#10 CSR ( *.pem *.der *.csr )"); filt.append("All Files ( *.* )"); QString s=""; - QFileDialog *dlg = new QFileDialog(this,0,true); + Q3FileDialog *dlg = new Q3FileDialog(this,0,true); dlg->setCaption(tr("Export Certificate signing request")); dlg->setFilters(filt); - dlg->setMode( QFileDialog::AnyFile ); + dlg->setMode( Q3FileDialog::AnyFile ); dlg->setSelection( req->getIntName() + ".csr" ); dlg->setDir(MainWindow::getPath()); if (dlg->exec()) { @@ -183,7 +183,7 @@ void ReqView::store(bool pem) req->writeReq(s, pem); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -194,15 +194,15 @@ void ReqView::signReq() req = (pki_x509req *)getSelected(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); return; } newCert(req); } -void ReqView::popupMenu(QListViewItem *item, const QPoint &pt, int x) { - QPopupMenu *menu = new QPopupMenu(this); - QPopupMenu *subExport = new QPopupMenu(this); +void ReqView::popupMenu(Q3ListViewItem *item, const QPoint &pt, int x) { + Q3PopupMenu *menu = new Q3PopupMenu(this); + Q3PopupMenu *subExport = new Q3PopupMenu(this); int itemExport; if (!item) { @@ -243,7 +243,7 @@ void ReqView::showKey(pki_key *key) dlg->exec(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } if (dlg) delete dlg; diff --git a/view/ReqView.h b/view/ReqView.h index 1ef18dcd..01414b1a 100644 --- a/view/ReqView.h +++ b/view/ReqView.h @@ -64,7 +64,7 @@ class ReqView : public XcaListView Q_OBJECT public: - ReqView(QWidget * parent = 0, const char * name = 0, WFlags f = 0); + ReqView(QWidget * parent = 0, const char * name = 0, Qt::WFlags f = 0); void showItem(pki_base *item, bool import); void newItem(); void deleteItem(); @@ -72,7 +72,7 @@ class ReqView : public XcaListView void updateViewItem(pki_base *); pki_base *loadItem(QString fname); void store(bool pem); - void popupMenu(QListViewItem *item, const QPoint &pt, int x); + void popupMenu(Q3ListViewItem *item, const QPoint &pt, int x); public slots: void writeReq_pem(); void writeReq_der(); diff --git a/view/TempView.cpp b/view/TempView.cpp index 3eaf20e5..ea5b6010 100644 --- a/view/TempView.cpp +++ b/view/TempView.cpp @@ -53,10 +53,10 @@ #include "TempView.h" #include "widgets/MainWindow.h" #include "widgets/NewX509.h" -#include -#include +#include +#include -TempView::TempView(QWidget * parent, const char * name, WFlags f) +TempView::TempView(QWidget * parent, const char * name, Qt::WFlags f) :XcaListView(parent, name, f) { addColumn(tr("Internal name")); @@ -155,7 +155,7 @@ void TempView::store() temp = (pki_temp *)getSelected(); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); return; } @@ -164,10 +164,10 @@ void TempView::store() filt.append("XCA Templates ( *.xca )"); filt.append("All Files ( *.* )"); QString s=""; - QFileDialog *dlg = new QFileDialog(this,0,true); + Q3FileDialog *dlg = new Q3FileDialog(this,0,true); dlg->setCaption(tr("Export Template")); dlg->setFilters(filt); - dlg->setMode( QFileDialog::AnyFile ); + dlg->setMode( Q3FileDialog::AnyFile ); dlg->setSelection( temp->getIntName() + ".xca" ); dlg->setDir(MainWindow::getPath()); if (dlg->exec()) { @@ -181,7 +181,7 @@ void TempView::store() temp->writeTemp(s); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -197,10 +197,10 @@ void TempView::reqFromTemp() newReq(temp); } -void TempView::popupMenu(QListViewItem *item, const QPoint &pt, int x) +void TempView::popupMenu(Q3ListViewItem *item, const QPoint &pt, int x) { - QPopupMenu *menu = new QPopupMenu(this); - QPopupMenu *subMenu = new QPopupMenu(this); + Q3PopupMenu *menu = new Q3PopupMenu(this); + Q3PopupMenu *subMenu = new Q3PopupMenu(this); if (!item) { menu->insertItem(tr("New Template"), subMenu); subMenu->insertItem(tr("Empty"), this, SLOT(newEmptyTemp())); diff --git a/view/TempView.h b/view/TempView.h index 0692f874..dc161d93 100644 --- a/view/TempView.h +++ b/view/TempView.h @@ -1,3 +1,7 @@ + +//Added by the Qt porting tool: +#include + /* vi: set sw=4 ts=4: */ /* * Copyright (C) 2001 Christian Hohnstaedt. @@ -56,9 +60,9 @@ #include "XcaListView.h" #include "lib/pki_temp.h" #ifdef qt4 -#include +#include #else -#include +#include #endif @@ -70,12 +74,12 @@ class TempView : public XcaListView QPixmap *keyicon; bool runTempDlg(pki_temp *); public: - TempView(QWidget * parent = 0, const char * name = 0, WFlags f = 0); + TempView(QWidget * parent = 0, const char * name = 0, Qt::WFlags f = 0); void showItem(pki_base *item, bool import); void newItem(int type); void updateViewItem(pki_base *); bool alterTemp(pki_temp *); - void popupMenu(QListViewItem *item, const QPoint &pt, int x); + void popupMenu(Q3ListViewItem *item, const QPoint &pt, int x); pki_base *loadItem(QString fname); public slots: void newEmptyTemp(); diff --git a/view/XcaListView.cpp b/view/XcaListView.cpp index b2e1e65d..9cd2d07b 100644 --- a/view/XcaListView.cpp +++ b/view/XcaListView.cpp @@ -54,22 +54,22 @@ #include "XcaListView.h" #include "widgets/MainWindow.h" #include "widgets/ImportMulti.h" -#include -#include -#include +#include +#include +#include -XcaListView::XcaListView( QWidget * parent, const char * name, WFlags f) - :QListView(parent, name, f) +XcaListView::XcaListView( QWidget * parent, const char * name, Qt::WFlags f) + :Q3ListView(parent, name, f) { #ifdef qt3 - connect( this, SIGNAL(itemRenamed(QListViewItem *, int, const QString &)), - this, SLOT(rename(QListViewItem *, int, const QString &))); + connect( this, SIGNAL(itemRenamed(Q3ListViewItem *, int, const QString &)), + this, SLOT(rename(Q3ListViewItem *, int, const QString &))); #endif - connect( this, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)), - this, SLOT(popupMenu(QListViewItem *, const QPoint &, int))) ; + connect( this, SIGNAL(rightButtonPressed(Q3ListViewItem *, const QPoint &, int)), + this, SLOT(popupMenu(Q3ListViewItem *, const QPoint &, int))) ; - connect( this, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(showItem(QListViewItem *))) ; + connect( this, SIGNAL(doubleClicked(Q3ListViewItem *)), + this, SLOT(showItem(Q3ListViewItem *))) ; } void XcaListView::setDB(db_base *mydb) @@ -94,7 +94,7 @@ void XcaListView::loadCont() pki_base *XcaListView::getSelected() { CHECK_DB_NULL - QListViewItem *lvi = selectedItem(); + Q3ListViewItem *lvi = selectedItem(); if (!lvi) return NULL; QString name = lvi->text(0); return db->getByName(name); @@ -110,12 +110,12 @@ void XcaListView::showItem(QString name) showItem(db->getByName(name), false); } -void XcaListView::showItem(QListViewItem *item) +void XcaListView::showItem(Q3ListViewItem *item) { showItem(db->getByName(item->text(0)), false); } -void XcaListView::rename(QListViewItem *item, int col, const QString &text) +void XcaListView::rename(Q3ListViewItem *item, int col, const QString &text) { CHECK_DB try { @@ -123,7 +123,7 @@ void XcaListView::rename(QListViewItem *item, int col, const QString &text) db->renamePKI(pki, text); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -132,7 +132,7 @@ void XcaListView::startRename() CHECK_DB try { #ifdef qt3 - QListViewItem *item = selectedItem(); + Q3ListViewItem *item = selectedItem(); if (item == NULL) return; item->startRename(0); #else @@ -140,7 +140,7 @@ void XcaListView::startRename() #endif } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } } @@ -171,7 +171,7 @@ void XcaListView::deleteItem_default(QString t1, QString t2) db->deletePKI(del); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); } updateView(); } @@ -187,12 +187,12 @@ void XcaListView::load_default(load_base &load) #endif QStringList slist; - QFileDialog *dlg = new QFileDialog(this,0,true); + Q3FileDialog *dlg = new Q3FileDialog(this,0,true); CHECK_DB dlg->setCaption(load.caption); dlg->setFilters(load.filter); - dlg->setMode( QFileDialog::ExistingFiles ); + dlg->setMode( Q3FileDialog::ExistingFiles ); dlg->setDir(MainWindow::getPath()); if (dlg->exec()) { slist = dlg->selectedFiles(); @@ -210,7 +210,7 @@ void XcaListView::load_default(load_base &load) item = load.loadItem(s); } catch (errorEx &err) { - Error(err); + Qt::SocketError(err); if (item) { delete item; item = NULL; @@ -250,7 +250,7 @@ void XcaListView::updateView() QListIterator it(container); for ( ; it.current(); ++it ) { pki = it.current(); - QListViewItem *lvi = new QListViewItem(this, pki->getIntName()); + Q3ListViewItem *lvi = new Q3ListViewItem(this, pki->getIntName()); insertItem(lvi); pki->setLvi(lvi); pki->updateView(); @@ -261,6 +261,6 @@ void XcaListView::newItem(void) { } void XcaListView::deleteItem(void) { } void XcaListView::load(void) { } void XcaListView::store(void) { } -void XcaListView::popupMenu(QListViewItem *, QPoint const &, int) { } +void XcaListView::popupMenu(Q3ListViewItem *, QPoint const &, int) { } void XcaListView::showItem(pki_base *, bool) { } diff --git a/view/XcaListView.h b/view/XcaListView.h index c3c50217..1abed3e1 100644 --- a/view/XcaListView.h +++ b/view/XcaListView.h @@ -52,11 +52,7 @@ #ifndef XCALISTVIEW_H #define XCALISTVIEW_H -#ifdef qt4 -#include -#else -#include -#endif +#include #include "lib/db_base.h" #include "lib/load_obj.h" #include "lib/exception.h" @@ -65,7 +61,7 @@ #define CHECK_DB emit init_database(); if (!MainWindow::dbenv) return; #define CHECK_DB_NULL emit init_database(); if (!MainWindow::dbenv) return NULL; -class XcaListView : public QListView +class XcaListView : public Q3ListView { Q_OBJECT @@ -73,7 +69,7 @@ class XcaListView : public QListView db_base *db; public: - XcaListView(QWidget * parent = 0, const char * name = 0, WFlags f = 0); + XcaListView(QWidget * parent = 0, const char * name = 0, Qt::WFlags f = 0); void setDB(db_base *mydb); void rmDB(db_base *mydb); virtual pki_base *getSelected(); @@ -82,21 +78,21 @@ class XcaListView : public QListView void load_default(QStringList &filter, QString caption); void load_default(load_base &load); void setDB(db_base *mydb, QPixmap *myimage); - void Error(errorEx &err); - bool Error(pki_base *pki); + void Qt::SocketError(errorEx &err); + bool Qt::SocketError(pki_base *pki); void loadCont(); public slots: virtual void newItem(); virtual void deleteItem(); void showItem(); void showItem(QString name); - void showItem(QListViewItem *item); + void showItem(Q3ListViewItem *item); virtual void load(); virtual void store(); - virtual void popupMenu(QListViewItem *item, const QPoint &pt, int x); + virtual void popupMenu(Q3ListViewItem *item, const QPoint &pt, int x); void startRename(); void renameDialog(); - void rename(QListViewItem *item, int col, const QString &text); + void rename(Q3ListViewItem *item, int col, const QString &text); virtual void updateView(); signals: void init_database(); diff --git a/widgets/CertDetail.cpp b/widgets/CertDetail.cpp index 4d98a0dc..5f0e12af 100644 --- a/widgets/CertDetail.cpp +++ b/widgets/CertDetail.cpp @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * Copyright (C) 2001 Christian Hohnstaedt. * @@ -35,12 +36,9 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * - * * http://www.hohnstaedt.de/xca * email: christian@hohnstaedt.de * @@ -53,15 +51,16 @@ #include "MainWindow.h" #include "distname.h" #include "clicklabel.h" -#include -#include -#include -#include +#include +//#include +#include +#include -CertDetail::CertDetail(QWidget *parent, const char *name, bool modal, WFlags f) - :CertDetail_UI(parent,name,true,0) +CertDetail::CertDetail(QWidget *parent) + :QDialog(parent) { - setCaption(tr(XCA_TITLE)); + setupUi(this); + setWindowTitle(tr(XCA_TITLE)); image->setPixmap(*MainWindow::certImg); descr->setReadOnly(true); } @@ -136,17 +135,9 @@ void CertDetail::setCert(pki_x509 *cert) fpSHA1->setText(cert->fingerprint(EVP_sha1())); // V3 extensions - v3Extensions->setText(cert->printV3ext()); + v3extensions->document()->setHtml(cert->printV3ext()); // Algorithm sigAlgo->setText(cert->getSigAlg()); sigAlgo->setReadOnly(true); } - -void CertDetail::setImport() -{ - // rename the buttons in case of import - but_ok->setText(tr("Import")); - but_cancel->setText(tr("Discard")); -} - diff --git a/widgets/CertDetail.h b/widgets/CertDetail.h index dadad577..4ef6f8f2 100644 --- a/widgets/CertDetail.h +++ b/widgets/CertDetail.h @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * Copyright (C) 2001 Christian Hohnstaedt. * @@ -35,12 +36,9 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * - * * http://www.hohnstaedt.de/xca * email: christian@hohnstaedt.de * @@ -55,14 +53,13 @@ class pki_x509; -class CertDetail: public CertDetail_UI +class CertDetail: public QDialog, private Ui::CertDetail { - Q_OBJECT + Q_OBJECT - public: - CertDetail( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); - void setCert(pki_x509 *cert); - void setImport(); + public: + CertDetail( QWidget *parent); + void setCert(pki_x509 *cert); }; #endif diff --git a/widgets/CertExtend.cpp b/widgets/CertExtend.cpp index 7a756dcf..cd2223b3 100644 --- a/widgets/CertExtend.cpp +++ b/widgets/CertExtend.cpp @@ -36,12 +36,9 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * - * * http://www.hohnstaedt.de/xca * email: christian@hohnstaedt.de * @@ -56,17 +53,18 @@ #include "lib/asn1time.h" #include "widgets/validity.h" #include "widgets/MainWindow.h" -#include -#include -#include -#include +#include +#include +#include +#include -CertExtend::CertExtend(QWidget *parent, const char *name, bool modal, WFlags f) - :CertExtend_UI(parent, name, modal, f) +CertExtend::CertExtend(QWidget *parent) + :QDialog(parent) { + setupUi(this); a1time time; - setCaption(tr(XCA_TITLE)); + setWindowTitle(tr(XCA_TITLE)); image->setPixmap(*MainWindow::certImg); notBefore->setDate(time.now()); notAfter->setDate(time.now(60 * 60 * 24 * 356)); @@ -74,6 +72,7 @@ CertExtend::CertExtend(QWidget *parent, const char *name, bool modal, WFlags f) void CertExtend::applyTimeDiff() { - applyTD(validNumber->text().toInt(), validRange->currentItem(), - midnightCB->isChecked(), notBefore, notAfter); +#warning applyTimeDiff +// applyTD(validNumber->text().toInt(), validRange->currentItem(), +// midnightCB->isChecked(), notBefore, notAfter); } diff --git a/widgets/CertExtend.h b/widgets/CertExtend.h index 2fabea23..eb4748c4 100644 --- a/widgets/CertExtend.h +++ b/widgets/CertExtend.h @@ -35,12 +35,9 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * - * * http://www.hohnstaedt.de/xca * email: christian@hohnstaedt.de * @@ -55,12 +52,12 @@ class pki_key; -class CertExtend: public CertExtend_UI +class CertExtend: public QDialog, private Ui::CertExtend { Q_OBJECT public: - CertExtend( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); + CertExtend(QWidget *parent); public slots: void applyTimeDiff(); diff --git a/widgets/CrlDetail.cpp b/widgets/CrlDetail.cpp index bb2fe616..ca62c988 100644 --- a/widgets/CrlDetail.cpp +++ b/widgets/CrlDetail.cpp @@ -55,12 +55,12 @@ #include "lib/pki_crl.h" #include "widgets/distname.h" #include "widgets/clicklabel.h" -#include -#include -#include -#include +#include +#include +#include +#include -CrlDetail::CrlDetail(QWidget *parent, const char *name, bool modal, WFlags f) +CrlDetail::CrlDetail(QWidget *parent, const char *name, bool modal, Qt::WFlags f) :CrlDetail_UI(parent, name, modal, f) { setCaption(tr(XCA_TITLE)); @@ -77,7 +77,7 @@ void CrlDetail::setCrl(pki_crl *crl) int numc, i; pki_x509 *iss, *last, *rev; x509rev revit; - QListViewItem *current; + Q3ListViewItem *current; x509v3ext e1, e2; QStringList sl; @@ -131,11 +131,11 @@ void CrlDetail::setCrl(pki_crl *crl) revit = crl->getRev(i); rev = MainWindow::certs->getByIssSerial(iss, revit.getSerial()); if (rev != NULL) { - current = new QListViewItem(certList, + current = new Q3ListViewItem(certList, rev->getIntName()); } else { - current = new QListViewItem(certList, + current = new Q3ListViewItem(certList, tr("Unknown certificate")); } current->setPixmap(0, *pki_x509::icon[2]); diff --git a/widgets/CrlDetail.h b/widgets/CrlDetail.h index ab128bb9..684fba0c 100644 --- a/widgets/CrlDetail.h +++ b/widgets/CrlDetail.h @@ -60,7 +60,7 @@ class CrlDetail: public CrlDetail_UI Q_OBJECT public: - CrlDetail( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); + CrlDetail( QWidget *parent = 0, const char *name = 0, bool modal = false, Qt::WFlags f = 0); void setCrl(pki_crl *crl); }; #endif diff --git a/widgets/ExportCert.cpp b/widgets/ExportCert.cpp index 63668d5b..50fe7c16 100644 --- a/widgets/ExportCert.cpp +++ b/widgets/ExportCert.cpp @@ -52,9 +52,9 @@ #include "ExportCert.h" #include "lib/base.h" -#include -#include -#include +#include +#include +#include ExportCert::ExportCert(QString fname, bool hasKey, QString dpath, const QString tcafn, QWidget *parent, const char *name ) @@ -85,10 +85,10 @@ void ExportCert::chooseFile() filt.append(tr("X509 Certificates ( *.cer *.crt *.p12 )")); filt.append(tr("All Files ( *.* )")); QString s = ""; - QFileDialog *dlg = new QFileDialog(this,0,true); + Q3FileDialog *dlg = new Q3FileDialog(this,0,true); dlg->setCaption(tr("Save Certificate as")); dlg->setFilters(filt); - dlg->setMode( QFileDialog::AnyFile ); + dlg->setMode( Q3FileDialog::AnyFile ); dlg->setSelection( filename->text() ); dlg->setDir(dirPath); if (dlg->exec()) diff --git a/widgets/ExportKey.cpp b/widgets/ExportKey.cpp index ee0912a9..047bcbd6 100644 --- a/widgets/ExportKey.cpp +++ b/widgets/ExportKey.cpp @@ -35,8 +35,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -52,91 +50,107 @@ #include "ExportKey.h" #include "lib/base.h" -#include -#include -#include -#include +#include +#include +#include +#include +#include -ExportKey::ExportKey(QString fname, bool onlypub, QString dpath, - QWidget *parent, const char *name ) - :ExportKey_UI(parent,name,true,0) +ExportKey::ExportKey(QWidget *parent,QString fname,bool onlypub,QString dpath) + :QDialog(parent) { + setupUi(this); filename->setText(fname); - setCaption(tr(XCA_TITLE)); + setWindowTitle(tr(XCA_TITLE)); onlyPub = onlypub; - exportFormat->insertItem("PEM"); - exportFormat->insertItem("DER"); + exportFormat->addItem("PEM"); + exportFormat->addItem("DER"); if (onlyPub) { privFrame->setDisabled(true); exportPrivate->setDisabled(true); encryptKey->setDisabled(true); - } + } else { exportPrivate->setChecked(true); - exportFormat->insertItem("PKCS#8"); + exportFormat->addItem("PKCS#8"); } canEncrypt(); dirPath = dpath; } -void ExportKey::chooseFile() +void ExportKey::on_fileBut_clicked() { QStringList filt; filt.append(tr("RSA Keys ( *.pem *.der *.pk8 )")); filt.append(tr("All Files ( *.* )")); QString s = ""; - QFileDialog *dlg = new QFileDialog(this,0,true); - dlg->setCaption(tr("Save RSA key as")); + QFileDialog *dlg = new QFileDialog(this); + dlg->setWindowTitle(tr("Save RSA key as")); dlg->setFilters(filt); - dlg->setMode( QFileDialog::AnyFile ); - dlg->setSelection( filename->text() ); - dlg->setDir(dirPath); - if (dlg->exec()) - s = dlg->selectedFile(); + dlg->setFileMode( QFileDialog::AnyFile ); + dlg->setDirectory(dirPath); + dlg->selectFile( filename->text() ); + if (dlg->exec()) { + if (!dlg->selectedFiles().isEmpty()) + s = dlg->selectedFiles()[0]; + } if (! s.isEmpty()) { QDir::convertSeparators(s); filename->setText(s); } - dirPath = dlg->dirPath(); + dirPath = dlg->directory().path(); delete dlg; } -void ExportKey::canEncrypt() { +void ExportKey::canEncrypt() +{ + printf("canEncrypt\n"); if (exportFormat->currentText() == "PKCS#8") { + printf("PKCS#8\n"); exportPrivate->setChecked(true); exportPrivate->setDisabled(true); encryptKey->setChecked(true); encryptKey->setDisabled(true); } else if (exportFormat->currentText() == "PEM" && !onlyPub) { + printf("PEM\n"); exportPrivate->setEnabled(true); - if (exportPrivate->isChecked()) { - encryptKey->setEnabled(true); - } - else { - encryptKey->setEnabled(false); - } + on_exportPrivate_stateChanged(); } else { + printf("else DER\n"); encryptKey->setDisabled(true); encryptKey->setChecked(false); exportPrivate->setEnabled(true); } if (onlyPub) { + printf("onlyPub\n"); exportPrivate->setChecked(false); exportPrivate->setDisabled(true); encryptKey->setChecked(false); encryptKey->setDisabled(true); } } - -void ExportKey::formatChanged() + +void ExportKey::on_exportFormat_activated(int c) { char *suffix[] = { "pem", "der", "pk8" }; - int selected = exportFormat->currentItem(); + QString fn = filename->text(); - QString nfn = fn.left(fn.findRev('.')+1) + suffix[selected]; + QString nfn = fn.left(fn.lastIndexOf('.')+1) + suffix[c]; filename->setText(nfn); + canEncrypt(); } +void ExportKey::on_exportPrivate_stateChanged() +{ + if (exportPrivate->isChecked() && + exportFormat->currentText() != "DER" && !onlyPub) + { + encryptKey->setEnabled(true); + } + else { + encryptKey->setEnabled(false); + } +} diff --git a/widgets/ExportKey.h b/widgets/ExportKey.h index b0e8169d..8254960a 100644 --- a/widgets/ExportKey.h +++ b/widgets/ExportKey.h @@ -53,17 +53,18 @@ #include "ui/ExportKey.h" -class ExportKey: public ExportKey_UI +class ExportKey: public QDialog, public Ui::ExportKey { Q_OBJECT + private: bool onlyPub; public: - ExportKey(QString fname, bool onlypub, QString dpath, - QWidget *parent = 0, const char *name = 0); + ExportKey(QWidget *parent, QString fname, bool onlypub, QString dpath); QString dirPath; public slots: - void chooseFile(); + void on_fileBut_clicked(); void canEncrypt(); - void formatChanged(); + void on_exportFormat_activated(int); + void on_exportPrivate_stateChanged(); }; #endif diff --git a/widgets/ExportTinyCA.cpp b/widgets/ExportTinyCA.cpp index 705018b9..e3639844 100644 --- a/widgets/ExportTinyCA.cpp +++ b/widgets/ExportTinyCA.cpp @@ -51,8 +51,8 @@ #include "ExportTinyCA.h" -#include -#include +#include +#include #include "lib/base.h" ExportTinyCA::ExportTinyCA(const QString tmpdir, const QString tcadir, @@ -67,9 +67,9 @@ ExportTinyCA::ExportTinyCA(const QString tmpdir, const QString tcadir, void ExportTinyCA::chooseTempDir() { QString s = ""; - QFileDialog *dlg = new QFileDialog(this,0,true); + Q3FileDialog *dlg = new Q3FileDialog(this,0,true); dlg->setCaption(tr("TinyCA Template directory")); - dlg->setMode( QFileDialog::DirectoryOnly ); + dlg->setMode( Q3FileDialog::DirectoryOnly ); dlg->setSelection( tempdir->text() ); if (dlg->exec()) s = dlg->selectedFile(); @@ -83,9 +83,9 @@ void ExportTinyCA::chooseTempDir() void ExportTinyCA::chooseTinyCaDir() { QString s = ""; - QFileDialog *dlg = new QFileDialog(this,0,true); + Q3FileDialog *dlg = new Q3FileDialog(this,0,true); dlg->setCaption(tr("TinyCA Directory ")); - dlg->setMode( QFileDialog::DirectoryOnly ); + dlg->setMode( Q3FileDialog::DirectoryOnly ); dlg->setSelection( tinycadir->text() ); if (dlg->exec()) s = dlg->selectedFile(); diff --git a/widgets/ImportMulti.cpp b/widgets/ImportMulti.cpp index e43fda76..568d4273 100644 --- a/widgets/ImportMulti.cpp +++ b/widgets/ImportMulti.cpp @@ -53,29 +53,28 @@ #include "ImportMulti.h" #include "MainWindow.h" #include "lib/pki_base.h" -#include "lib/pki_pkcs7.h" -#include "lib/pki_pkcs12.h" -#include "lib/pki_crl.h" -#include "widgets/CrlDetail.h" -#include "widgets/CertDetail.h" +//#include "lib/pki_pkcs7.h" +//#include "lib/pki_pkcs12.h" +//#include "lib/pki_crl.h" +//#include "widgets/CrlDetail.h" +//#include "widgets/CertDetail.h" #include "widgets/KeyDetail.h" -#include "widgets/ReqDetail.h" -#include -#include -#include -#include +//#include "widgets/ReqDetail.h" +#include +#include +#include -ImportMulti::ImportMulti(QWidget *parent, const char *name, bool modal, WFlags f ) - :ImportMulti_UI(parent, name, modal, f) +ImportMulti::ImportMulti(QWidget *parent) + :QDialog(parent) { - setCaption(tr(XCA_TITLE)); - image->setPixmap(*MainWindow::certImg); - itemView->addColumn(tr("Internal name")); - itemView->addColumn(tr("Common name")); - itemView->addColumn(tr("Serial")); + setWindowTitle(tr(XCA_TITLE)); + //image->setPixmap(*MainWindow::certImg); + //itemView->addColumn(tr("Internal name")); + //itemView->addColumn(tr("Common name")); + //itemView->addColumn(tr("Serial")); cont.clear(); cont.setAutoDelete(false); - connect( itemView, SIGNAL(doubleClicked(QListViewItem *)), + connect( itemView, SIGNAL(doubleClicked()), this, SLOT(details())) ; } @@ -86,11 +85,10 @@ void ImportMulti::addItem(pki_base *pki) QString cn = pki->getClassName(); if (cn == "pki_x509" || cn == "pki_key" || cn == "pki_x509req" || cn == "pki_crl" || cn == "pki_temp" ) { - QListViewItem *current = new QListViewItem(itemView); - pki->setLvi(current); - pki->updateView(); + //Q3ListViewItem *current = new Q3ListViewItem(itemView); cont.append(pki); } +#if 0 else if (cn == "pki_pkcs7") { pki_pkcs7 *p7 = ( pki_pkcs7 *)pki; for (int i=0; inumCert(); i++) { @@ -111,13 +109,14 @@ void ImportMulti::addItem(pki_base *pki) QMessageBox::warning(this, XCA_TITLE, tr("The type of the Item is not recognized: ") + cn, tr("OK")); } +#endif } - -void ImportMulti::showPopupMenu(QListViewItem *item, const QPoint &pt, int x) +#if 0 +void ImportMulti::showPopupMenu(Q3ListViewItem *item, const QPoint &pt, int x) { - QPopupMenu *menu = new QPopupMenu(this); + Q3PopupMenu *menu = new Q3PopupMenu(this); menu->insertItem(tr("Import"), this, SLOT(import())); menu->insertItem(tr("Details"), this, SLOT(details())); @@ -139,11 +138,12 @@ void ImportMulti::remove() pki_base *ImportMulti::getSelected() { - QListViewItem *current = itemView->selectedItem(); + Q3ListViewItem *current = itemView->selectedItem(); return search(current); } - -pki_base *ImportMulti::search(QListViewItem *current) +#endif +#if 0 +pki_base *ImportMulti::search(Q3ListViewItem *current) { for (pki_base *pki = cont.first(); pki != 0; pki = cont.next() ) { if (current == pki->getLvi()) return pki; @@ -168,7 +168,7 @@ void ImportMulti::import() void ImportMulti::import(pki_base *pki) { if (!pki) return; - QListViewItem *lvi = pki->getLvi(); + Q3ListViewItem *lvi = pki->getLvi(); pki->delLvi(); QString cn = pki->getClassName(); emit init_database(); @@ -255,13 +255,14 @@ ImportMulti::~ImportMulti() cont.clear(); } +#endif void ImportMulti::execute(int force) { /* if there is nothing to import don't pop up */ if (cont.count() == 0) return; /* if there is only 1 item and force is 0 import it silently */ if (cont.count() == 1 && force == 0) { - import(cont.first()); +// import(cont.first()); return; } /* the behavoiour for more than one item */ diff --git a/widgets/ImportMulti.h b/widgets/ImportMulti.h index 40dc078c..a531cdf4 100644 --- a/widgets/ImportMulti.h +++ b/widgets/ImportMulti.h @@ -54,30 +54,28 @@ #include "ui/ImportMulti.h" #include "lib/pki_base.h" -#include -#ifndef qt3 -#include -#endif +#include class pki_x509; class pki_key; -class ImportMulti: public ImportMulti_UI +class ImportMulti: public QDialog, private Ui::ImportMulti { Q_OBJECT + private: QList cont; public: - ImportMulti( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); + ImportMulti( QWidget *parent = 0); ~ImportMulti(); void addItem(pki_base *pki); - pki_base *search(QListViewItem *current); + //pki_base *search(Q3ListViewItem *current); pki_base *getSelected(); void import(pki_base *pki); void execute(int force=0); public slots: - void showPopupMenu(QListViewItem *item, const QPoint &pt, int x); + // void showPopupMenu(Q3ListViewItem *item, const QPoint &pt, int x); void remove(); void details(); void import(); diff --git a/widgets/KeyDetail.cpp b/widgets/KeyDetail.cpp index 2e68717a..c1923aa1 100644 --- a/widgets/KeyDetail.cpp +++ b/widgets/KeyDetail.cpp @@ -52,18 +52,18 @@ #include "KeyDetail.h" #include "MainWindow.h" -#include "lib/pki_crl.h" +#include "lib/pki_key.h" #include "widgets/distname.h" #include "widgets/clicklabel.h" -#include -#include -#include -#include +#include +#include +#include -KeyDetail::KeyDetail(QWidget *parent, const char *name, bool modal, WFlags f) - :KeyDetail_UI(parent, name, modal, f) +KeyDetail::KeyDetail(QWidget *parent) + :QDialog(parent) { - setCaption(tr(XCA_TITLE)); + setupUi(this); + setWindowTitle(tr(XCA_TITLE)); image->setPixmap(*MainWindow::keyImg); keyDesc->setReadOnly(true); } @@ -97,10 +97,3 @@ void KeyDetail::setKey(pki_key *key) tlHeader->setText("UNKNOWN Key"); } } - -void KeyDetail::setImport() -{ - but_ok->setText(tr("Import")); - but_cancel->setText(tr("Discard")); -} - diff --git a/widgets/KeyDetail.h b/widgets/KeyDetail.h index ad8f01a1..6fc9d699 100644 --- a/widgets/KeyDetail.h +++ b/widgets/KeyDetail.h @@ -55,12 +55,12 @@ class pki_key; -class KeyDetail: public KeyDetail_UI +class KeyDetail: public QDialog, private Ui::KeyDetail { Q_OBJECT public: - KeyDetail( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); + KeyDetail(QWidget *parent); void setKey(pki_key *key); void setImport(); diff --git a/widgets/MW_database.cpp b/widgets/MW_database.cpp index 1f8ae149..5711ef2b 100644 --- a/widgets/MW_database.cpp +++ b/widgets/MW_database.cpp @@ -36,12 +36,9 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * - * * http://www.hohnstaedt.de/xca * email: christian@hohnstaedt.de * @@ -51,54 +48,23 @@ #include "MainWindow.h" +#if 0 #include "view/KeyView.h" #include "view/ReqView.h" #include "view/CertView.h" #include "view/CrlView.h" #include "view/TempView.h" -#include -#include +#endif +#include +#include void MainWindow::init_database() { - if (dbenv) return; // already initialized.... - try { - global_tid = NULL; - dbenv = new DbEnv(0); - dbenv->set_errcall(&MainWindow::dberr); - dbenv->open(QFile::encodeName(baseDir), DB_RECOVER | DB_INIT_TXN | \ - DB_INIT_MPOOL | DB_INIT_LOG | DB_INIT_LOCK | \ - DB_CREATE | DB_PRIVATE , 0600 ); - dbenv->txn_begin(NULL, &global_tid, 0); -#ifndef DB_AUTO_COMMIT -#define DB_AUTO_COMMIT 0 -#endif - dbenv->set_flags(DB_AUTO_COMMIT,1); - } - catch (DbException &err) { - QString e = err.what(); - e += QString::fromLatin1(" (") + baseDir + QString::fromLatin1(")"); - if (global_tid) - global_tid->abort(); - dbenv->close(0); - dbenv = NULL; - return; - - } - fprintf(stderr, "Opening database: %s\n", dbfile.latin1()); - try { - settings = new db_base(dbenv, dbfile, "settings",global_tid, NULL); - if (!initPass()) { - /* password error */ - delete settings; settings = NULL; - global_tid->abort(); - dbenv->close(0); - pki_key::erasePasswd(); - dbenv = NULL; - return; - } - keys = new db_key(dbenv, dbfile, global_tid, keyList); - reqs = new db_x509req(dbenv, dbfile, keys, global_tid, reqList); + fprintf(stderr, "Opening database: %s\n", CCHAR(dbfile)); + keys = new db_key(dbfile, this); + reqs = new db_x509req(dbfile, this); + certs = new db_x509(dbfile, this); +#if 0 certs = new db_x509(dbenv, dbfile, keys, global_tid, certList); temps = new db_temp(dbenv, dbfile, global_tid, tempList); crls = new db_crl(dbenv, dbfile, global_tid, crlList); @@ -110,15 +76,6 @@ void MainWindow::init_database() { certList->setDB(certs); tempList->setDB(temps); crlList->setDB(crls); - } - catch (errorEx &err) { - Error(err); - } - catch (DbException &err) { - qFatal(err.what()); - } - - statusBar()->message(tr("Database") + ":" + dbfile); connect( keys, SIGNAL(newKey(pki_key *)), certs, SLOT(newKey(pki_key *)) ); @@ -128,20 +85,26 @@ void MainWindow::init_database() { reqs, SLOT(newKey(pki_key *)) ); connect( keys, SIGNAL(delKey(pki_key *)), reqs, SLOT(delKey(pki_key *)) ); - connect( crls, SIGNAL(updateCertView()), - certList, SLOT(updateView()) ); +// connect( crls, SIGNAL(updateCertView()), +// certList, SLOT(updateView()) ); -} +#endif + statusBar()->showMessage(tr("Database") + ":" + dbfile); + keyView->setModel(keys); + reqView->setModel(reqs); + certView->setModel(certs); + printf("req new\n"); +} void MainWindow::dump_database() { QString dirname; - QFileDialog *dlg = new QFileDialog(this,0,true); - dlg->setCaption(tr("Dump to directory")); - dlg->setMode(QFileDialog::AnyFile); + QFileDialog *dlg = new QFileDialog(this); + dlg->setWindowTitle(tr("Dump to directory")); + dlg->setFileMode(QFileDialog::AnyFile); if (dlg->exec()) { - dirname = dlg->selectedFile(); + dirname = dlg->selectedFiles()[0]; } delete dlg; @@ -151,7 +114,7 @@ void MainWindow::dump_database() QDir d(dirname); if ( ! d.exists() && !d.mkdir(dirname)) { errorEx err("Could not create '" + dirname + "'"); - Error(err); + // Qt::SocketError(err); return; } @@ -163,36 +126,120 @@ void MainWindow::dump_database() reqs->dump(dirname); } catch (errorEx &err) { - Error(err); + // Qt::SocketError(err); } } void MainWindow::close_database() { - if (!dbenv) return; - - delete(crls); + //delete(crls); delete(reqs); delete(certs); - delete(temps); + //delete(temps); delete(keys); - delete(settings); + //delete(settings); + + db mydb(dbfile); + mydb.shrink( DBFLAG_OUTDATED | DBFLAG_DELETED ); + +#if 0 crlList->rmDB(crls); certList->rmDB(certs); reqList->rmDB(reqs); tempList->rmDB(temps); keyList->rmDB(keys); +#endif crls = NULL; reqs = NULL; certs = NULL; temps = NULL; keys = NULL; settings = NULL; - global_tid->commit(0); - global_tid = NULL; - dbenv->close(0); - pki_key::erasePasswd(); - dbenv = NULL; } +/* Async Key buttons */ +void MainWindow::on_BNnewKey_clicked(void) +{ + if (keys) + keys->newItem(); +} +void MainWindow::on_BNdeleteKey_clicked(void) +{ + if (keys) + keys->deleteSelectedItems(keyView); +} +void MainWindow::on_BNdetailsKey_clicked(void) +{ + if (keys) + keys->showSelectedItems(keyView); +} +void MainWindow::on_BNimportKey_clicked(void) +{ + if(keys) + keys->load(); +} +void MainWindow::on_BNexportKey_clicked(void) +{ + if(keys) + keys->storeSelectedItems(keyView); +} +void MainWindow::on_keyView_doubleClicked(QModelIndex &m) +{ + printf("Key View double clicked\n"); + if (keys) + keys->showItem(m); +} +/* Certificate request buttons */ +void MainWindow::on_BNnewReq_clicked(void) +{ + if (reqs) + reqs->newItem(); +} +void MainWindow::on_BNdeleteReq_clicked(void) +{ + if (reqs) + reqs->deleteSelectedItems(reqView); +} +void MainWindow::on_BNdetailsReq_clicked(void) +{ + if (reqs) + reqs->showSelectedItems(reqView); +} +void MainWindow::on_BNimportReq_clicked(void) +{ + if (reqs) + reqs->load(); +} +void MainWindow::on_BNexportReq_clicked(void) +{ + if(reqs) + reqs->storeSelectedItems(reqView); +} + +/* Certificate buttons */ +void MainWindow::on_BNnewCert_clicked(void) +{ + if (certs) + certs->newItem(); +} +void MainWindow::on_BNdeleteCert_clicked(void) +{ + if (certs) + certs->deleteSelectedItems(certView); +} +void MainWindow::on_BNdetailsCert_clicked(void) +{ + if (certs) + certs->showSelectedItems(certView); +} +void MainWindow::on_BNimportCert_clicked(void) +{ + if (certs) + certs->load(); +} +void MainWindow::on_BNexportCert_clicked(void) +{ + if(certs) + certs->storeSelectedItems(certView); +} diff --git a/widgets/MW_help.cpp b/widgets/MW_help.cpp index 5e612155..ae168ce1 100644 --- a/widgets/MW_help.cpp +++ b/widgets/MW_help.cpp @@ -51,11 +51,11 @@ #include "MainWindow.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "ui/About.h" #include "ui/Help.h" #include "lib/func.h" @@ -82,12 +82,16 @@ qFatal("Cmdline Error (%s)\n", msg); void MainWindow::about() { - About_UI *about = new About_UI(this, 0, true ); + Ui::About ui; + QDialog *about = new QDialog(this, 0); + + ui.setupUi(about); + QString cont; cont.sprintf("

XCA

" - "

Copyright 2002 - 2003 by Christian Hohnstädt - " + "

Copyright 2002 - 2006 by Christian Hohnstädt - " "version : " VER "" - "

%s
%s
QT: %s" + "

%s
QT: %s" "


" "" "" @@ -99,21 +103,22 @@ void MainWindow::about() "" "
Christian Hohnstädt<christian@hohnstaedt.de>
Programming, Translation and Testing
SPKAC support and Testing

General support
" "

Mark Foster <mark@foster.cc>", - OPENSSL_VERSION_TEXT, DB_VERSION_STRING, QT_VERSION_STR ); + OPENSSL_VERSION_TEXT, QT_VERSION_STR ); - about->setCaption(tr(XCA_TITLE)); - about->image->setPixmap( *keyImg ); - about->image1->setPixmap( *certImg ); - about->textbox->setText(cont); + about->setWindowTitle(tr(XCA_TITLE)); + //ui.image->setPixmap( *keyImg ); + //ui.image1->setPixmap( *certImg ); + ui.textbox->setHtml(cont); about->exec(); } void MainWindow::help() { - Help_UI *h = new Help_UI(this, 0, true ); - h->setCaption(tr(XCA_TITLE)); - h->textbox->mimeSourceFactory()->setFilePath(getPrefix()); - h->textbox->setSource("xca.html"); + QDialog *h = new QDialog(this, 0); + Ui::Help ui; + ui.setupUi(h); + h->setWindowTitle(tr(XCA_TITLE)); + ui.textbox->setSource(QUrl("file://xca.html")); h->exec(); } diff --git a/widgets/MW_menu.cpp b/widgets/MW_menu.cpp index b3a1cec5..ffcfc64d 100644 --- a/widgets/MW_menu.cpp +++ b/widgets/MW_menu.cpp @@ -52,50 +52,48 @@ #include "MainWindow.h" #include "lib/load_obj.h" -#include -#include +#include +#include void MainWindow::init_menu() { - QPopupMenu *file = new QPopupMenu( this ); - file->insertItem(tr("&Open default DataBase"), this, SLOT(load_def_database()), CTRL+Key_O ); - file->insertItem(tr("Open &DataBase"), this, SLOT(load_database()), CTRL+Key_L ); - file->insertItem(tr("&Close DataBase"), this, SLOT(close_database()), CTRL+Key_C ); - file->insertItem(tr("&Dump DataBase"), this, SLOT(dump_database()), CTRL+Key_C ); - file->insertSeparator(); - file->insertItem(tr("E&xit"), qApp, SLOT(quit()), ALT+Key_F4 ); - - QPopupMenu *help = new QPopupMenu( this ); - help->insertItem(tr("&Content"), this, SLOT(help()), Key_F1 ); - help->insertItem(tr("&About"), this, SLOT(about()) ); + QMenu *file; + QMenu *help; -#if 0 - mb = new QMenuBar( this ); -#endif - mb = menuBar(); - mb->insertItem(tr("&File"), file ); - mb->insertSeparator(); - mb->insertItem(tr("&Help"), help ); - mb->setSeparator( QMenuBar::InWindowsStyle ); + file = menuBar()->addMenu(tr("&File")); + file->addAction(tr("&Open default DataBase"), this, + SLOT(load_def_database()), Qt::CTRL+Qt::Key_O ); + file->addAction(tr("Open &DataBase"), this, + SLOT(load_database()), Qt::CTRL+Qt::Key_L ); + file->addAction(tr("&Close DataBase"), this, + SLOT(close_database()), Qt::CTRL+Qt::Key_C ); + file->addAction(tr("&Dump DataBase"), this, + SLOT(dump_database()), Qt::CTRL+Qt::Key_C ); + file->addSeparator(); + file->addAction(tr("E&xit"), qApp, SLOT(quit()), Qt::ALT+Qt::Key_F4 ); + + help = menuBar()->addMenu(tr("&Help") ); + help->addAction(tr("&Content"), this, SLOT(help()), Qt::Key_F1 ); + help->addAction(tr("&About"), this, SLOT(about()) ); } void MainWindow::load_database() { - load_db l; + load_key l; QString fname; - QFileDialog *dlg = new QFileDialog(this,0,true); - dlg->setCaption(l.caption); + QFileDialog *dlg = new QFileDialog(this); + dlg->setWindowTitle(l.caption); dlg->setFilters(l.filter); - dlg->setMode( QFileDialog::AnyFile ); - dlg->setDir(baseDir); + dlg->setFileMode( QFileDialog::AnyFile ); + dlg->setDirectory(baseDir); if (dlg->exec()) { - fname = dlg->selectedFile(); + fname = dlg->selectedFiles()[0]; } delete dlg; if (fname.isEmpty()) return; dbfile = fname; close_database(); - fprintf(stderr, "Dir: %s, File: %s\n", baseDir.latin1(), dbfile.latin1() ); + fprintf(stderr, "Dir: %s, File: %s\n", baseDir.data(), dbfile.data() ); emit init_database(); } diff --git a/widgets/MainWindow.cpp b/widgets/MainWindow.cpp index 96767535..c4b9945d 100644 --- a/widgets/MainWindow.cpp +++ b/widgets/MainWindow.cpp @@ -36,8 +36,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -50,30 +48,27 @@ */ -#define MDEBUG +//#define MDEBUG #include "MainWindow.h" -#include "ImportMulti.h" -#include -#include -#include -#include -#include -#include -#include -#include +//#include "ImportMulti.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "lib/exception.h" #include "lib/pki_pkcs12.h" -#include "view/KeyView.h" -#include "view/ReqView.h" -#include "view/CertView.h" -#include "view/TempView.h" -#include "view/CrlView.h" #include "lib/load_obj.h" #include "lib/pass_info.h" #include "lib/func.h" #include "ui/PassRead.h" #include "ui/PassWrite.h" + QPixmap *MainWindow::keyImg = NULL, *MainWindow::csrImg = NULL, *MainWindow::certImg = NULL, *MainWindow::tempImg = NULL, *MainWindow::nsImg = NULL, *MainWindow::revImg = NULL, @@ -85,24 +80,25 @@ db_x509 *MainWindow::certs = NULL; db_temp *MainWindow::temps = NULL; db_base *MainWindow::settings = NULL; db_crl *MainWindow::crls = NULL; -DbEnv *MainWindow::dbenv = NULL; NIDlist *MainWindow::eku_nid = NULL; NIDlist *MainWindow::dn_nid = NULL; NIDlist *MainWindow::aia_nid = NULL; -MainWindow::MainWindow(QWidget *parent, const char *name ) - :MainWindow_UI(parent, name) +MainWindow::MainWindow(QWidget *parent ) + :QMainWindow(parent) { - setCaption(tr(XCA_TITLE)); + statusBar()->clearMessage(); + + setWindowTitle(tr(XCA_TITLE)); dbfile = DBFILE; - dbenv = NULL; - global_tid = NULL; force_load = 0; - + baseDir = getBaseDir(); - + + setupUi(this); + init_menu(); init_images(); @@ -122,8 +118,9 @@ MainWindow::MainWindow(QWidget *parent, const char *name ) init_baseDir(); - if (force_load) - emit init_database(); + dbfile = baseDir + QDir::separator() + dbfile; + init_database(); + printf("Init database\n"); } /* creates a new nid list from the given filename */ @@ -153,12 +150,12 @@ void MainWindow::init_baseDir() { static bool done = false; if (done) return; - fprintf(stderr, "base Dir: %s\n", baseDir.latin1()); + fprintf(stderr, "base Dir: %s\n", CCHAR(baseDir)); QDir d(baseDir); if ( ! d.exists() && !d.mkdir(baseDir)) { QMessageBox::warning(this,tr(XCA_TITLE), QString::fromLatin1("Could not create: ") + baseDir); - qFatal( QString::fromLatin1("Could not create: ") + baseDir ); + qFatal("Could not create base dir"); } done = true; @@ -168,24 +165,33 @@ void MainWindow::init_baseDir() eku_nid = read_nidlist("eku.txt"); dn_nid = read_nidlist("dn.txt"); aia_nid = read_nidlist("aia.txt"); + + char *p; + db mydb(dbfile); + if (!mydb.find(setting, "workingdir")) { + if ((p = (char *)mydb.load(NULL))) { + workingdir = p; + free(p); + } + } } void MainWindow::do_connections() { - +#if 0 connect( keyList, SIGNAL(init_database()), this, SLOT(init_database())); connect( reqList, SIGNAL(init_database()), this, SLOT(init_database())); connect( certList, SIGNAL(init_database()), this, SLOT(init_database())); connect( tempList, SIGNAL(init_database()), this, SLOT(init_database())); connect( crlList, SIGNAL(init_database()), this, SLOT(init_database())); - - connect( BNnewKey, SIGNAL(clicked()), keyList, SLOT(newItem())); - connect( BNexportKey, SIGNAL(clicked()), keyList, SLOT(store())); - connect( BNimportKey, SIGNAL(clicked()), keyList, SLOT(load())); - connect( BNdetailsKey, SIGNAL(clicked()), keyList, SLOT(showItem())); - connect( BNdeleteKey, SIGNAL(clicked()), keyList, SLOT(deleteItem())); - connect( BNchangePass, SIGNAL(clicked()), keyList, SLOT(changePasswd())); - + connect( BNnewKey, SIGNAL(clicked()), keys, SLOT(newItem())); + connect( BNexportKey, SIGNAL(clicked()), keys, SLOT(store())); + connect( BNimportKey, SIGNAL(clicked()), keys, SLOT(load())); + connect( BNdetailsKey, SIGNAL(clicked()), keys, SLOT(showItem())); + connect( BNdeleteKey, SIGNAL(clicked()), keys, SLOT(deleteItem())); + connect( BNchangePass, SIGNAL(clicked()), keys, SLOT(changePasswd())); +#endif +#if 0 connect( BNnewReq, SIGNAL(clicked()), reqList, SLOT(newItem())); connect( BNimportReq, SIGNAL(clicked()), reqList, SLOT(load())); connect( BNdetailsReq, SIGNAL(clicked()), reqList, SLOT(showItem())); @@ -216,7 +222,7 @@ void MainWindow::do_connections() connect( certList, SIGNAL(connNewX509(NewX509 *)), this, SLOT(connNewX509(NewX509 *)) ); connect( reqList, SIGNAL(connNewX509(NewX509 *)), this, SLOT(connNewX509(NewX509 *)) ); - + connect( reqList, SIGNAL(newCert(pki_x509req *)), certList, SLOT(newCert(pki_x509req *)) ); connect( certList, SIGNAL(genCrl(pki_x509 *)), @@ -225,12 +231,11 @@ void MainWindow::do_connections() certList, SLOT(newCert(pki_temp *)) ); connect( tempList, SIGNAL(newReq(pki_temp *)), reqList, SLOT(newItem(pki_temp *)) ); - +#endif } void MainWindow::init_images() { - keyImg = loadImg("bigkey.png"); csrImg = loadImg("bigcsr.png"); certImg = loadImg("bigcert.png"); @@ -238,12 +243,13 @@ void MainWindow::init_images() nsImg = loadImg("netscape.png"); revImg = loadImg("bigcrl.png"); appIco = loadImg("key.xpm"); + printf("k:%p, c:%p\n", keyImg, csrImg); bigKey->setPixmap(*keyImg); bigCsr->setPixmap(*csrImg); bigCert->setPixmap(*certImg); bigTemp->setPixmap(*tempImg); bigRev->setPixmap(*revImg); - setIcon(*appIco); + setWindowIcon(*appIco); pki_key::icon[0] = loadImg("key.png"); pki_key::icon[1] = loadImg("halfkey.png"); pki_x509req::icon[0] = loadImg("req.png"); @@ -254,8 +260,10 @@ void MainWindow::init_images() pki_x509::icon[2] = loadImg("invalidcert.png"); pki_x509::icon[3] = loadImg("invalidcertkey.png"); pki_x509::icon[4] = loadImg("revoked.png"); - pki_temp::icon = loadImg("template.png"); - pki_crl::icon = loadImg("crl.png"); +#if 0 + pki_temp::icon = loadImg("template.png"); + pki_crl::icon = loadImg("crl.png"); +#endif } void MainWindow::read_cmdline() @@ -265,16 +273,17 @@ void MainWindow::read_cmdline() pki_base *item = NULL; load_base *lb = NULL; exitApp = 0; - +#if 0 ImportMulti *dlgi = NULL; dlgi = new ImportMulti(this, NULL, true); - +#endif while (cnt < qApp->argc()) { arg = qApp->argv()[cnt]; if (arg[0] == '-') { // option if (lb) delete lb; opt = 1; lb = NULL; type = 1; switch (arg[1]) { +#if 0 case 'c' : lb = new load_cert(); break; case 'r' : lb = new load_req(); break; case 'k' : lb = new load_key(); break; @@ -282,12 +291,13 @@ void MainWindow::read_cmdline() case '7' : lb = new load_pkcs7(); break; case 'l' : lb = new load_crl(); break; case 't' : lb = new load_temp(); break; +#endif case 'd' : type = 1; force_load=1; break; case 'b' : type = 2; break; case 'v' : fprintf(stderr, XCA_TITLE " Version " VER "\n"); opt=0; exitApp=1; break; case 'x' : exitApp = 1; opt=0; break; - default : cmd_help(tr("no such option: ") + arg ); + default : cmd_help((char*)(QString(tr("no such option: ")) + arg).data() ); } if (arg[2] != '\0' && opt==1) { arg+=2; @@ -301,10 +311,9 @@ void MainWindow::read_cmdline() item = NULL; try { item = lb->loadItem(arg); - dlgi->addItem(item); + //dlgi->addItem(item); } catch (errorEx &err) { - Error(err); if (item) { delete item; item = NULL; @@ -315,16 +324,17 @@ void MainWindow::read_cmdline() switch (type) { case 1 : dbfile = arg; break; case 2 : baseDir = arg; init_baseDir(); break; - default : cmd_help(tr("I'm puzzled: this should not happen ! ") ); + default : cmd_help("I'm puzzled: this should not happen ! " ); } } cnt++; } - +#if 0 connect( dlgi, SIGNAL(init_database()), this, SLOT(init_database())); dlgi->execute(1); /* force showing of import dialog */ delete dlgi; +#endif } @@ -350,12 +360,13 @@ int MainWindow::initPass() { pass_info p(tr("New Password"), tr("Please enter a password, that will be used to encrypt your private keys in the database-file")); - QString passHash = settings->getString("pwhash"); + QString passHash;// = settings->getString("pwhash"); +#warning Keep a Passwd in DB ?? if (passHash.isEmpty()) { int keylen = passWrite((char *)pki_key::passwd, 25, 0, &p); if (keylen == 0) return 0; pki_key::passwd[keylen]='\0'; - settings->putString( "pwhash", md5passwd(pki_key::passwd) ); + //settings->putString( "pwhash", md5passwd(pki_key::passwd) ); } else { int keylen=0; @@ -377,43 +388,61 @@ int MainWindow::initPass() int MainWindow::passRead(char *buf, int size, int rwflag, void *userdata) { pass_info *p = (pass_info *)userdata; - PassRead_UI *dlg = new PassRead_UI(NULL, 0, true); + printf("Userdata called\n"); + Ui::PassRead ui; + QDialog *dlg = new QDialog(qApp->activeWindow()); + ui.setupUi(dlg); if (p != NULL) { - dlg->image->setPixmap( *keyImg ); - dlg->title->setText(tr(p->getTitle())); - dlg->description->setText(tr(p->getDescription())); + //ui.image->setPixmap( *keyImg ); + ui.description->setText(p->getDescription()); + dlg->setWindowTitle(p->getTitle()); } - dlg->pass->setFocus(); - dlg->setCaption(tr(XCA_TITLE)); + dlg->show(); + //dlg->activateWindow(); + ui.pass->setFocus(); + buf[0] = '-'; /* if this remains the dialog was aborted */ if (dlg->exec()) { - QString x = dlg->pass->text(); - strncpy(buf, x.latin1(), size); + QString x = ui.pass->text(); + strncpy(buf, x.toAscii(), size); + delete dlg; return x.length(); } - else return 0; + else { + delete dlg; + return 0; + } } int MainWindow::passWrite(char *buf, int size, int rwflag, void *userdata) { pass_info *p = (pass_info *)userdata; - PassWrite_UI *dlg = new PassWrite_UI(NULL, 0, true); + Ui::PassWrite ui; + QDialog *dlg = new QDialog(qApp->activeWindow()); + ui.setupUi(dlg); if (p != NULL) { - dlg->image->setPixmap( *keyImg ); - dlg->title->setText(tr(p->getTitle())); - dlg->description->setText(tr(p->getDescription())); + //ui.image->setPixmap( *keyImg ); + ui.description->setText(p->getDescription()); + dlg->setWindowTitle(p->getTitle()); } - dlg->passA->setFocus(); - dlg->setCaption(tr(XCA_TITLE)); + dlg->show(); + //dlg->activateWindow(); + ui.passA->setFocus(); + if (dlg->exec()) { - QString A = dlg->passA->text(); - QString B = dlg->passB->text(); - if (A != B) return 0; - strncpy(buf, A.latin1(), size); + QString A = ui.passA->text(); + QString B = ui.passB->text(); + delete dlg; + if (A != B) + return 0; + strncpy(buf, A.toAscii(), size); return A.length(); } - else return 0; + else { + delete dlg; + return 0; + } } QString MainWindow::md5passwd(const char *pass) @@ -439,43 +468,45 @@ void MainWindow::Error(errorEx &err) { if (err.isEmpty()) return; QString msg = tr("The following error occured:") + "\n" + err.getString(); - int ret = QMessageBox::warning(NULL, XCA_TITLE, msg, tr("&OK"), tr("Copy to Clipboard")); + int ret = QMessageBox::warning(qApp->activeWindow(), XCA_TITLE, + msg, tr("&OK"), tr("Copy to Clipboard")); if (ret == 1) { QClipboard *cb = QApplication::clipboard(); cb->setText(msg); } } -void MainWindow::dberr(const char *errpfx, char *msg) -{ - errorEx e(QString(errpfx) + "\n" + msg); - Error(e); -} - QString MainWindow::getPath() { - QString x = settings->getString("workingdir"); - return x; + return workingdir; } void MainWindow::setPath(QString str) { - settings->putString("workingdir", str); + db mydb(dbfile); + workingdir = str; + mydb.set((const unsigned char *)CCHAR(str), str.length()+1, 1, setting, "workingdir"); } NewX509 *MainWindow::newX509() { +#if 0 return new NewX509(NULL, 0, true); +#endif } void MainWindow::connNewX509(NewX509 *nx) { +#if 0 connect( (const QObject *)nx->genKeyBUT, SIGNAL(clicked()), keyList, SLOT(newItem()) ); connect( nx, SIGNAL(genKey()), keyList, SLOT(newItem()) ); connect( keyList, SIGNAL(keyDone(QString)), nx, SLOT(newKeyDone(QString)) ); +#endif } void MainWindow::changeView() { +#if 0 certList->changeView(BNviewState); +#endif } diff --git a/widgets/MainWindow.h b/widgets/MainWindow.h index 56998eba..c8f512b7 100644 --- a/widgets/MainWindow.h +++ b/widgets/MainWindow.h @@ -1,4 +1,4 @@ -/* uvi: set sw=4 ts=4: */ +/* vi: set sw=4 ts=4: */ /* * Copyright (C) 2001 Christian Hohnstaedt. * @@ -49,8 +49,8 @@ * */ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H +#ifndef _MAINWINDOW_H +#define _MAINWINDOW_H #include "NewX509.h" #include "ui/MainWindow.h" @@ -61,31 +61,30 @@ #include "lib/db_crl.h" #include "lib/exception.h" #include "lib/oid.h" -#include -#include -#include +#include +#include +#include #define DBFILE "xca.db" - -class MainWindow: public MainWindow_UI +class MainWindow: public QMainWindow, private Ui::MainWindow { Q_OBJECT + private: + QString workingdir; + protected: void init_images(); void read_cmdline(); void init_menu(); void do_connections(); void init_baseDir(); - DbTxn *global_tid; - QMenuBar *mb; int force_load; NIDlist *read_nidlist(QString name); - friend class pki_key; + QLabel *statusLabel; - public: - static DbEnv *dbenv; + public: static db_x509 *certs; static db_x509req *reqs; static db_key *keys; @@ -97,23 +96,24 @@ class MainWindow: public MainWindow_UI int exitApp; QString baseDir, dbfile, dbdir; - MainWindow(QWidget *parent, const char *name); - ~MainWindow(); + MainWindow(QWidget *parent); + virtual ~MainWindow(); void loadSettings(); void saveSettings(); int initPass(); static int passRead(char *buf, int size, int rwflag, void *userdata); static int passWrite(char *buf, int size, int rwflag, void *userdata); - static void dberr(const char *errpfx, char *msg); static NewX509 *newX509(); static QString md5passwd(const char *pass); + //static void Qt::SocketError(errorEx &err); static void Error(errorEx &err); void cmd_help(const char* msg); - static QString getPath(); - static void setPath(QString path); + QString getPath(); + void setPath(QString path); bool mkDir(QString dir); - public slots: + + public slots: void init_database(); void load_database(); void load_def_database(); @@ -123,7 +123,26 @@ class MainWindow: public MainWindow_UI void changeView(); void about(); void help(); - + + private slots: + void on_keyView_doubleClicked(QModelIndex &m); + + void on_BNnewKey_clicked(void); + void on_BNdeleteKey_clicked(void); + void on_BNdetailsKey_clicked(void); + void on_BNimportKey_clicked(void); + void on_BNexportKey_clicked(void); + void on_BNnewReq_clicked(void); + void on_BNdeleteReq_clicked(void); + void on_BNdetailsReq_clicked(void); + void on_BNimportReq_clicked(void); + void on_BNexportReq_clicked(void); + + void on_BNnewCert_clicked(void); + void on_BNdeleteCert_clicked(void); + void on_BNdetailsCert_clicked(void); + void on_BNimportCert_clicked(void); + void on_BNexportCert_clicked(void); }; #endif diff --git a/widgets/Makefile b/widgets/Makefile index 0da5a258..9b6984be 100644 --- a/widgets/Makefile +++ b/widgets/Makefile @@ -7,10 +7,14 @@ ifeq ($(TOPDIR),) TOPDIR=.. endif -MOC_NAMES=CertDetail ExportKey KeyDetail distname CrlDetail ExportTinyCA \ +#MOC_NAMES=CertDetail ExportKey KeyDetail distname CrlDetail ExportTinyCA \ MainWindow ReqDetail validity ExportCert ImportMulti NewX509 \ CertExtend clicklabel v3ext - + +MOC_NAMES=MainWindow KeyDetail clicklabel XcaTreeView ExportKey NewX509 \ + validity v3ext ReqDetail distname CertDetail CertExtend + +#NAMES=$(MOC_NAMES) NewX509_ext MW_menu MW_help MW_database NAMES=$(MOC_NAMES) NewX509_ext MW_menu MW_help MW_database OBJS=$(patsubst %,moc_%.o,$(MOC_NAMES)) $(patsubst %,%.o,$(NAMES)) DELFILES=$(patsubst %,moc_%.cpp,$(MOC_NAMES)) diff --git a/widgets/NewX509.cpp b/widgets/NewX509.cpp index 966d64af..b12d35e7 100644 --- a/widgets/NewX509.cpp +++ b/widgets/NewX509.cpp @@ -36,8 +36,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -51,23 +49,16 @@ #include "NewX509.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "MainWindow.h" -#include "validity.h" #include "v3ext.h" #include "lib/x509name.h" #include "lib/db_key.h" @@ -88,37 +79,31 @@ int NewX509::name_nid[] = { NID_pkcs9_emailAddress }; -NewX509::NewX509(QWidget *parent , const char *name, bool modal, WFlags f) - :NewX509_UI(parent, name, modal, f) +NewX509::NewX509(QWidget *parent) + :QDialog(parent) { - unsigned int i; - connect( extDNadd, SIGNAL(clicked()), this, SLOT(addX509NameEntry()) ); - connect( extDNdel, SIGNAL(clicked()), this, SLOT(delX509NameEntry()) ); + int i; + //connect( extDNadd, SIGNAL(clicked()), this, SLOT(addX509NameEntry()) ); + //connect( extDNdel, SIGNAL(clicked()), this, SLOT(delX509NameEntry()) ); eku_nid = *MainWindow::eku_nid; dn_nid = *MainWindow::dn_nid; aia_nid = *MainWindow::aia_nid; - setCaption(tr(XCA_TITLE)); + setupUi(this); + + setWindowTitle(tr(XCA_TITLE)); fixtemp = NULL; + nsImg->setPixmap(*MainWindow::nsImg); -#ifndef qt3 - // pretty fat Title :-) - QFont tFont;// = getFont(); - tFont.setPointSize(14); - tFont.setBold(true); - tFont.setUnderline(true); - //setFont( tFont ); -#else //setFont( tFont ); serialNr->setValidator( new QRegExpValidator(QRegExp("[0-9a-fA-F]*"), this)); -#endif QStringList strings; // are there any useable private keys ? strings = MainWindow::keys->get0PrivateDesc(); - keyList->insertStringList(strings); - hashAlgo->setCurrentItem(1); + keyList->insertItems(0, strings); + hashAlgo->setCurrentIndex(2); // any PKCS#10 requests to be used ? strings = MainWindow::reqs->getDesc(); @@ -127,17 +112,18 @@ NewX509::NewX509(QWidget *parent , const char *name, bool modal, WFlags f) reqList->setDisabled(true); } else { - reqList->insertStringList(strings); + reqList->insertItems(0, strings); } // How about signing certificates ? - strings = MainWindow::certs->getSignerDesc(); +// strings = MainWindow::certs->getSignerDesc(); +#warning certs->getSignerDesc() if (strings.isEmpty()) { foreignSignRB->setDisabled(true); certList->setDisabled(true); } else { - certList->insertStringList(strings); + certList->insertItems(0, strings); } // set dates to now and now + 1 year @@ -146,24 +132,26 @@ NewX509::NewX509(QWidget *parent , const char *name, bool modal, WFlags f) notAfter->setDate(a.now(60*60*24*365)); // settings for the templates .... - strings = MainWindow::temps->getDesc(); +#warning fix templates + strings.clear(); + //strings = MainWindow::temps->getDesc(); strings.prepend(tr("Server Template")); strings.prepend(tr("Client Template")); strings.prepend(tr("CA Template")); strings.prepend(tr("Empty Template")); - tempList->insertStringList(strings); + tempList->insertItems(0, strings); // setup Extended keyusage for (i=0; i < eku_nid.count(); i++) - ekeyUsage->insertItem(OBJ_nid2ln(eku_nid[i])); + ekeyUsage->insertItem(0, OBJ_nid2ln(eku_nid[i])); // setup Distinguished Name for (i=0; i < dn_nid.count(); i++) - extDNobj->insertItem(OBJ_nid2ln(dn_nid[i])); + extDNobj->insertItem(0, OBJ_nid2ln(dn_nid[i])); // setup Authority Info Access for (i=0; i < aia_nid.count(); i++) - aiaOid->insertItem(OBJ_nid2ln(aia_nid[i])); + aiaOid->insertItem(0, OBJ_nid2ln(aia_nid[i])); // init the X509 v3 context X509V3_set_ctx(&ext_ctx, NULL , NULL, NULL, NULL, 0); @@ -179,36 +167,18 @@ NewX509::NewX509(QWidget *parent , const char *name, bool modal, WFlags f) name_ptr[6] = emailAddress; // last polish - setFinishEnabled(page7,true); - setNextEnabled(page2,false); signerChanged(); checkAuthKeyId(); } void NewX509::setRequest() { -// setAppropriate(page4, false); -// setAppropriate(page5, false); -// setAppropriate(page6, false); - finishButton()->setEnabled(true); - changeDefault->setEnabled(true); - changeDefault->setChecked(true); - signerBox->setEnabled(false); requestBox->setEnabled(false); - timeRangeBox->setEnabled(false); - validitybox->setEnabled(false); - startText_h=tr("Welcome to the settings for certificate signing requests."); - startText_b=tr("A signing request needs a private key, so it will be " - "created if there isn't any unused key available in the key " - "database. This signing request can then be given to a " - "Certification authority while the private key of the request " - "and of the resulting certificate returned from the CA does never " - "leave your computer."); - endText=tr("You are done with entering all parameters for generating " - "a Certificate signing request. The resulting request should " - "be exported and send to an appropriate CA for signing it."); + signerBox->setEnabled(false); + validityBox->setEnabled(false); + rangeBox->setEnabled(false); + tabWidget->setCurrentIndex(1); tText=tr("Certificate signing request"); - setup(); setImage(MainWindow::csrImg); } @@ -219,69 +189,28 @@ NewX509::~NewX509() void NewX509::setTemp(pki_temp *temp) { - setAppropriate(page1, false); - finishButton()->setEnabled(true); - startText_h=tr("Welcome to the settings for Templates."); - startText_b=tr("This templates do not refer to any ASN.1 structure " - "but are used to keep default settings for signing requests and " - "certificates. When creating a Request or Certificate the template " - "can preset the needed fields with default settings."); - endText=tr("You are done with entering all parameters for the Template.\n" - "After this step the template can be assigned to one of your CAs to " - "be autoatically applied when signing with this CA."); tText=tr("Template"); if (temp->getIntName() != "--") { description->setText(temp->getIntName()); tText += tr(" change"); } - setup(); - privKeyBox->setEnabled(false); - validitybox->setEnabled(false); - setImage(MainWindow::tempImg); +// privKeyBox->setEnabled(false); +// validitybox->setEnabled(false); +// setImage(MainWindow::tempImg); } void NewX509::setCert() { - finishButton()->setEnabled(true); - startText_h=tr("Welcome to the settings for Certificates."); - startText_b=tr("The information for the new Certificate can either be " - "grabbed from a given Certificate-request or be filled in by hand. " - "In the case of not signing a request there needs to be at least one " - "unused key. If this is not the case it will be created. If you want " - "to self-sign a request (unusual but nevertheless possible) you need " - "the private key used to create the request."); - endText=tr("You are done with entering all parameters for creating " - "a Certificate."); tText=tr("Certificate"); - setup(); - setImage(MainWindow::certImg); +// setImage(MainWindow::certImg); } void NewX509::setImage(QPixmap *image) { - bigImg1->setPixmap(*image); - bigImg2->setPixmap(*image); - bigImg3->setPixmap(*image); - bigImg4->setPixmap(*image); - bigImg5->setPixmap(*image); - bigImg6->setPixmap(*image); + bigImg->setPixmap(*image); } -void NewX509::setup() -{ - startLabel_h->setText(startText_h); - startLabel_b->setText(startText_b); - endLabel->setText(endText); - setTitle(page0, tText + " Wizard"); - setTitle(page1, tText + " template selection"); - setTitle(page2, tText + " personal settings"); - setTitle(page4, tText + " X.509 v3 Extensions"); - setTitle(page5, tText + " key usage setup"); - setTitle(page6, tText + " Netscape extensions"); - setTitle(page7, tText + " Wizard finished"); -} - void NewX509::defineTemplate(pki_temp *temp) { fromTemplate(temp); @@ -295,45 +224,30 @@ void NewX509::defineRequest(pki_x509req *req) fromReqCB->setEnabled(true); fromReqCB->setChecked(true); QString reqname = req->getIntName(); -#ifdef qt3 - reqList->setCurrentText(reqname); -#else - for (int i=0; icount(); i++) { - if (reqList->text(i) == reqname) { - reqList->setCurrentItem(i); - break; - } - } -#endif - +// reqList->setCurrentText(reqname); } void NewX509::defineSigner(pki_x509 *defcert) { // suggested from: Andrey Brindeew - if (defcert && defcert->canSign()) { +#warning FIX define Signer + if (defcert /* && defcert->canSign()*/ ) { QString name = defcert->getIntName(); -#ifdef qt3 - certList->setCurrentText(name); -#else - for (int i=0; icount();i++) { - if (certList->text(i) == name) { - certList->setCurrentItem(i); - break; - } - } -#endif + certList->findText(name); foreignSignRB->setChecked(true); certList->setEnabled(true); } } -int NewX509::lb2int(QListBox *lb) +int NewX509::lb2int(QListWidget *lb) { - int x=0; - for (int i=0; lb->item(i); i++) { - if (lb->isSelected(i)){ + int i, x=0, c=lb->count(); + QListWidgetItem *item; + + for (i=0; iitem(i); + if (lb->isItemSelected(item)){ x |= 1<item(i); i++) { - lb->setSelected(i, (1<count(); + QListWidgetItem *item; + + for (i=0; iitem(i); + lb->setItemSelected(item, (1<setText(temp->nsRenewalUrl); nsCaPolicyUrl->setText(temp->nsCaPolicyUrl); nsSslServerName->setText(temp->nsSslServerName); - int2lb(nsCertType, temp->nsCertType); - basicCA->setCurrentItem(temp->ca); +#warning settings + //int2lb(nsCertType, temp->nsCertType); + basicCA->setCurrentIndex(temp->ca); bcCritical->setChecked(temp->bcCrit); kuCritical->setChecked(temp->keyUseCrit); ekuCritical->setChecked(temp->eKeyUseCrit); @@ -376,7 +295,7 @@ void NewX509::fromTemplate(pki_temp *temp) int2lb(keyUsage, temp->keyUse); int2lb(ekeyUsage, temp->eKeyUse); validNumber->setText(QString::number(temp->validN)); - validRange->setCurrentItem(temp->validM); + validRange->setCurrentIndex(temp->validM); midnightCB->setChecked(temp->validMidn); if (temp->pathLen) { basicPath->setText(QString::number(temp->pathLen)); @@ -401,8 +320,8 @@ void NewX509::toTemplate(pki_temp *temp) temp->nsRenewalUrl = nsRenewalUrl->text(); temp->nsCaPolicyUrl = nsCaPolicyUrl->text(); temp->nsSslServerName = nsSslServerName->text(); - temp->nsCertType = lb2int(nsCertType); - temp->ca = basicCA->currentItem(); +// temp->nsCertType = lb2int(nsCertType); + temp->ca = basicCA->currentIndex(); temp->bcCrit = bcCritical->isChecked(); temp->keyUseCrit = kuCritical->isChecked(); temp->eKeyUseCrit = ekuCritical->isChecked(); @@ -413,7 +332,7 @@ void NewX509::toTemplate(pki_temp *temp) temp->keyUse = lb2int(keyUsage); temp->eKeyUse = lb2int(ekeyUsage); temp->validN = validNumber->text().toInt(); - temp->validM = validRange->currentItem(); + temp->validM = validRange->currentIndex(); temp->pathLen = basicPath->text().toInt(); temp->validMidn = midnightCB->isChecked(); } @@ -421,11 +340,9 @@ void NewX509::toTemplate(pki_temp *temp) void NewX509::toggleFromRequest() { if (fromReqCB->isChecked()) { - setAppropriate(page2, false); reqList->setEnabled(true); } else { - setAppropriate(page2, true); reqList->setEnabled(false); } } @@ -443,13 +360,9 @@ void NewX509::dataChangeP2() { if (description->text() != "" && countryName->text().length() !=1 && (keyList->count() > 0 || !keyList->isEnabled())){ - setNextEnabled(page2,true); - } - else { - setNextEnabled(page2,false); } } - +#if 0 void NewX509::showPage(QWidget *page) { @@ -493,7 +406,7 @@ void NewX509::showPage(QWidget *page) checkAuthKeyId(); } - QWizard::showPage(page); + Q3Wizard::showPage(page); if ( page == page2 ) { description->setFocus(); @@ -504,9 +417,11 @@ void NewX509::showPage(QWidget *page) } +#endif void NewX509::signerChanged() { +#if 0 a1time snb, sna; pki_x509 *cert = getSelectedSigner(); @@ -523,23 +438,17 @@ void NewX509::signerChanged() if (templ.isEmpty()) return; templateChanged(templ); - +#else +#warning signerChanged +#endif } void NewX509::templateChanged(QString tempname) { if (!tempList->isEnabled()) return; -#ifdef qt3 - tempList->setCurrentText(tempname); -#else - for (int i=0; icount();i++) { - if (tempList->text(i) == tempname) { - tempList->setCurrentItem(i); - break; - } - } -#endif +#warning set current Item + //tempList->setCurrentItem(0, tempname); templateChanged(); } @@ -553,11 +462,11 @@ void NewX509::templateChanged(pki_temp *templ) void NewX509::templateChanged() { +#if 0 pki_temp *temp = NULL; int item; - if (!appropriate(page1)) return; if (!tempList->isEnabled()) return; - if ((item = tempList->currentItem())<4) { + if ((item = tempList->currentIndex())<4) { temp = new pki_temp("temp",item); if (temp) { fromTemplate(temp); @@ -570,8 +479,12 @@ void NewX509::templateChanged() temp = (pki_temp *)MainWindow::temps->getByName(name); if (!temp) return; fromTemplate(temp); -} +#else +#warning templateChanged +#endif +} +#if 0 void NewX509::switchExtended() { if ( !appropriate(page1) ) return; @@ -586,12 +499,12 @@ void NewX509::switchExtended() setAppropriate(page6, false); } } - +#endif void NewX509::checkAuthKeyId() { bool enabled = false; // for Templates: - if ( !appropriate(page1) ) enabled = true ; +// if ( !appropriate(page1) ) enabled = true ; if (foreignSignRB->isChecked()) { //if (getSelectedSigner()->hasSubAltName()) @@ -606,14 +519,14 @@ void NewX509::checkAuthKeyId() void NewX509::newKeyDone(QString name) { - keyList->insertItem(name,0); - keyList->setCurrentItem(0); + keyList->insertItem(0, name); + keyList->setCurrentIndex(0); dataChangeP2(); } void NewX509::helpClicked() { - QWhatsThis::enterWhatsThisMode(); + //Q3WhatsThis::enterWhatsThisMode(); } pki_key *NewX509::getSelectedKey() @@ -638,6 +551,7 @@ x509name NewX509::getX509name() for (int j = 0; jtext()); } +#if 0 QListViewItem *lvi = extDNlist->firstChild(); while (lvi != NULL) { int nid; @@ -645,6 +559,9 @@ x509name NewX509::getX509name() x.addEntryByNid(nid, lvi->text(1)); lvi = lvi->nextSibling(); } +#else +#warning getX509name +#endif return x; } @@ -665,25 +582,28 @@ void NewX509::setX509name(const x509name &n) } } if (j == EXPLICIT_NAME_CNT) { - new QListViewItem(extDNlist, sl[1], sl[2]); +#warning add extDNlist item + //new QListViewItem(extDNlist, sl[1], sl[2]); } } } void NewX509::addX509NameEntry() { - new QListViewItem(extDNlist, extDNobj->currentText(), extDNname->text()); +#warning add extDNlist item +// new QListViewItem(extDNlist, extDNobj->currentText(), extDNname->text()); } void NewX509::delX509NameEntry() { - extDNlist->removeItem(extDNlist->currentItem()); +#warning remove extDNlist item + //extDNlist->removeItem(extDNlist->currentItem()); } const EVP_MD *NewX509::getHashAlgo() { const EVP_MD *ha[] = {EVP_md2(), EVP_md5(), EVP_sha1()}; - return ha[hashAlgo->currentItem()]; + return ha[hashAlgo->currentIndex()]; } void NewX509::applyTimeDiff() @@ -691,7 +611,7 @@ void NewX509::applyTimeDiff() #define d_fac (60 * 60 * 24) int faktor[] = { 1, 30, 365 }; int N = validNumber->text().toInt(); - int M = validRange->currentItem(); + int M = validRange->currentIndex(); int midnight = midnightCB->isChecked()? 1:0; if (M>2||M<0) M=0; @@ -711,6 +631,7 @@ void NewX509::applyTimeDiff() void NewX509::editV3ext(QLineEdit *le, QString types, int n) { +#if 0 v3ext *dlg; pki_x509 *cert, *signcert; pki_x509req *req; @@ -730,34 +651,27 @@ void NewX509::editV3ext(QLineEdit *le, QString types, int n) signcert = cert; } - dlg = new v3ext(this, NULL, true); - dlg->addInfo(le, QStringList::split(',', types ), n, + dlg = new v3ext(this); + dlg->addInfo(le, types.split(',' ), n, signcert->getCert(), cert->getCert()); dlg->exec(); delete(dlg); delete(cert); +#else +#warning editV3ext +#endif } void NewX509::editSubAltName() { -#if OPENSSL_VERSION_NUMBER >= 0x00908000L editV3ext(subAltName, "email,email:copy,RID,URI,DNS,IP,otherName", NID_subject_alt_name); -#else - editV3ext(subAltName, "email,email:copy,RID,URI,DNS,IP", - NID_subject_alt_name); -#endif } void NewX509::editIssAltName() { -#if OPENSSL_VERSION_NUMBER >= 0x00908000L editV3ext(issAltName, "email,RID,URI,DNS,IP,issuer:copy,otherName", NID_issuer_alt_name); -#else - editV3ext(issAltName, "email,RID,URI,DNS,IP,issuer:copy", - NID_issuer_alt_name); -#endif } void NewX509::editCrlDist() @@ -770,4 +684,3 @@ void NewX509::editAuthInfAcc() editV3ext(authInfAcc, "email,RID,URI,DNS,IP", NID_info_access); } - diff --git a/widgets/NewX509.h b/widgets/NewX509.h index 02c42d4d..8654b2b8 100644 --- a/widgets/NewX509.h +++ b/widgets/NewX509.h @@ -35,8 +35,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -55,6 +53,7 @@ #include "ui/NewX509.h" #include "lib/oid.h" #include +#include class MainWindow; class extList; @@ -68,7 +67,7 @@ class x509name; class x509v3ext; class extList; -class NewX509: public NewX509_UI +class NewX509: public QDialog, public Ui::NewX509 { Q_OBJECT private: @@ -83,21 +82,20 @@ class NewX509: public NewX509_UI X509V3_CTX ext_ctx; void editV3ext(QLineEdit *le, QString types, int n); public: - NewX509(QWidget *parent, const char *name, bool modal = false, WFlags f = 0); - ~NewX509(); + NewX509(QWidget *parent); + virtual ~NewX509(); void initCtx(); void setRequest(); // reduce to request form void setTemp(pki_temp *temp); // reduce to template form void setCert(); // reduce to certificate form - void setup(); - void showPage(QWidget *page); + //void showPage(QWidget *page); void toTemplate(pki_temp *temp); void fromTemplate(pki_temp *temp); void defineTemplate(pki_temp *temp); void defineRequest(pki_x509req *req); void defineSigner(pki_x509 *defcert); - int lb2int(QListBox *lb); - void int2lb(QListBox *lb, int x); + int lb2int(QListWidget *lb); + void int2lb(QListWidget *lb, int x); void templateChanged(pki_temp *templ); void templateChanged(QString templatename); pki_key *getSelectedKey(); @@ -130,7 +128,7 @@ class NewX509: public NewX509_UI void keyChanged(const QString &keyname); void dataChangeP2(); void newKeyDone(QString name); - void switchExtended(); + //void switchExtended(); void templateChanged(); void signerChanged(); void helpClicked(); diff --git a/widgets/NewX509_ext.cpp b/widgets/NewX509_ext.cpp index 0f8946c3..01157d7e 100644 --- a/widgets/NewX509_ext.cpp +++ b/widgets/NewX509_ext.cpp @@ -51,14 +51,14 @@ #include "NewX509.h" -#include -#include -#include -#include -#include -#include -#include -#include +//#include +#include +#include +#include +#include +//#include +//#include +#include #include "MainWindow.h" #include "lib/x509v3ext.h" @@ -68,10 +68,10 @@ x509v3ext NewX509::getBasicConstraints() QStringList cont; x509v3ext ext; QString ca[] = { "", "CA:TRUE", "CA:FALSE" }; - if (basicCA->currentItem() > 0) { + if (basicCA->currentIndex() > 0) { if (bcCritical->isChecked()) cont << "critical"; - cont << ca[basicCA->currentItem()]; + cont << ca[basicCA->currentIndex()]; if (!basicPath->text().isEmpty()) cont << (QString)"pathlen:" + basicPath->text(); ext.create(NID_basic_constraints, cont.join(", ")); @@ -125,30 +125,34 @@ x509v3ext NewX509::getKeyUsage() QStringList cont; x509v3ext ext; - QListBoxItem *item; - for (int i=0; (item = keyUsage->item(i)); i++) { +#warning getKeyUsage +#if 0 + Q3ListBoxItem *item; + for (int i=0; (item = keyUsage->item(i)); i++) { if (item->selected()) { cont << keyusage[i]; } } +#endif if (kuCritical->isChecked() && cont.count() > 0) cont.prepend("critical"); ext.create(NID_key_usage, cont.join(", ")); return ext; } - - x509v3ext NewX509::getEkeyUsage() { QStringList cont; x509v3ext ext; - QListBoxItem *item; +#warning getKeyUsage +#if 0 + Q3ListBoxItem *item; for (int i=0; (item = ekeyUsage->item(i)); i++) { if (item->selected()){ cont << (QString)OBJ_nid2sn(eku_nid[i]); } } +#endif if (ekuCritical->isChecked() && cont.count() > 0) cont.prepend("critical"); ext.create(NID_ext_key_usage, cont.join(", ")); @@ -182,10 +186,10 @@ QString NewX509::getAuthInfAcc_string() { QString rval=""; QString aia_txt = authInfAcc->text(); - aia_txt.stripWhiteSpace(); + aia_txt = aia_txt.trimmed(); if (!aia_txt.isEmpty()) { - rval = OBJ_nid2sn(aia_nid[aiaOid->currentItem()]); + rval = OBJ_nid2sn(aia_nid[aiaOid->currentIndex()]); rval += ";" + aia_txt; } return rval; @@ -196,21 +200,20 @@ void NewX509::setAuthInfAcc_string(QString aia_txt) QStringList aia; int nid; - aia = aia.split(';', aia_txt); + aia = aia_txt.split(';'); if (aia.count() != 2) return; - nid = OBJ_sn2nid(aia[0].latin1()); + nid = OBJ_sn2nid(CCHAR(aia[0])); - for (unsigned int i=0; i < aia_nid.count(); i++) { + for (int i=0; i < aia_nid.count(); i++) { if (aia_nid[i] == nid) { - aiaOid->setCurrentItem(i); + aiaOid->setCurrentIndex(i); } } authInfAcc->setText(aia[1]); } - x509v3ext NewX509::getAuthInfAcc() { x509v3ext ext; @@ -260,12 +263,15 @@ extList NewX509::getNetscapeExt() QStringList cont; x509v3ext ext; extList el; - QListBoxItem *item; - for (int i=0; (item = nsCertType->item(i)); i++) { - if (item->selected()){ - cont << certTypeList[i]; - } - } +#warning q3listbox +#if 0 + Q3ListBoxItem *item; + for (int i=0; (item = nsCertType->item(i)); i++) { + if (item->selected()) { + cont << certTypeList[i]; + } + } +#endif el << ext.create(NID_netscape_cert_type, cont.join(", ")); el << ext.create(NID_netscape_base_url, nsBaseUrl->text()); el << ext.create(NID_netscape_revocation_url, nsRevocationUrl->text()); diff --git a/widgets/ReqDetail.cpp b/widgets/ReqDetail.cpp index bb6637fd..580a7d60 100644 --- a/widgets/ReqDetail.cpp +++ b/widgets/ReqDetail.cpp @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * Copyright (C) 2001 Christian Hohnstaedt. * @@ -35,12 +36,9 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * - * * http://www.hohnstaedt.de/xca * email: christian@hohnstaedt.de * @@ -54,15 +52,14 @@ #include "distname.h" #include "clicklabel.h" #include "lib/pki_x509req.h" -#include -#include -#include -#include +#include +#include -ReqDetail::ReqDetail(QWidget *parent, const char *name, bool modal, WFlags f ) - :ReqDetail_UI(parent, name, modal, f) +ReqDetail::ReqDetail(QWidget *parent) + :QDialog(parent) { - setCaption(tr(XCA_TITLE)); + setupUi(this); + setWindowTitle(tr(XCA_TITLE)); image->setPixmap(*MainWindow::csrImg); descr->setReadOnly(true); } @@ -103,12 +100,6 @@ void ReqDetail::setReq(pki_x509req *req) // The extensions extList el = req->getV3Ext(); - v3extensions->setText(el.getHtml("
")); + v3extensions->document()->setHtml(el.getHtml("
")); } -void ReqDetail::setImport() -{ - // rename the buttons in case of import - but_ok->setText(tr("Import")); - but_cancel->setText(tr("Discard")); -} diff --git a/widgets/ReqDetail.h b/widgets/ReqDetail.h index 37639932..ba09ac6f 100644 --- a/widgets/ReqDetail.h +++ b/widgets/ReqDetail.h @@ -35,8 +35,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -48,21 +46,21 @@ * */ -#ifndef REQDETAIL_H -#define REQDETAIL_H +#ifndef _REQDETAIL_H +#define _REQDETAIL_H #include "ui/ReqDetail.h" +#include class pki_x509req; -class ReqDetail: public ReqDetail_UI +class ReqDetail: public QDialog, public Ui::ReqDetail { Q_OBJECT public: - ReqDetail( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); + ReqDetail( QWidget *parent); void setReq(pki_x509req *req); - void setImport(); }; #endif diff --git a/widgets/XcaTreeView.cpp b/widgets/XcaTreeView.cpp new file mode 100644 index 00000000..67d17109 --- /dev/null +++ b/widgets/XcaTreeView.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2001 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.sleepycat.com + * + * http://www.trolltech.com + * + * + * + * http://www.hohnstaedt.de/xca + * email: christian@hohnstaedt.de + * + * $Id$ + * + */ + + +#include "XcaTreeView.h" +#include "lib/db_base.h" +#include +#include + +XcaTreeView::XcaTreeView(QWidget *parent) + :QTreeView(parent) +{ + setAlternatingRowColors(true); +} + +void XcaTreeView::contextMenuEvent(QContextMenuEvent * e ) +{ + db_base *dbb = (db_base*)model(); + + dbb->showContextMenu(e, indexAt(e->pos())); +} diff --git a/widgets/XcaTreeView.h b/widgets/XcaTreeView.h new file mode 100644 index 00000000..20174dfc --- /dev/null +++ b/widgets/XcaTreeView.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2001 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.sleepycat.com + * + * http://www.trolltech.com + * + * + * + * http://www.hohnstaedt.de/xca + * email: christian@hohnstaedt.de + * + * $Id$ + * + */ + +#ifndef _XCATREEVIEW_H +#define _XCATREEVIEW_H + +#include + +class XcaTreeView: public QTreeView +{ + Q_OBJECT + + public: + XcaTreeView(QWidget *parent = 0); + void contextMenuEvent(QContextMenuEvent * e); +}; + +#endif diff --git a/widgets/clicklabel.cpp b/widgets/clicklabel.cpp index d2cff92e..02a538e7 100644 --- a/widgets/clicklabel.cpp +++ b/widgets/clicklabel.cpp @@ -51,20 +51,20 @@ #include "clicklabel.h" -#include -#include -#include +#include +#include +#include -ClickLabel::ClickLabel( QWidget* parent, const char* name, WFlags f ) - :QLabel( parent, name, f ) +ClickLabel::ClickLabel(QWidget *parent) + :QLabel(parent) { QFont fnt( font() ); fnt.setBold(true); setFont( fnt ); setFrameShape( QLabel::Panel ); setFrameShadow( QLabel::Sunken ); - setAlignment( int( QLabel::AlignCenter ) ); - QToolTip::add( this, tr("Double click for details") ); + setAlignment( Qt::AlignCenter ); + setToolTip( tr("Double click for details") ); } void ClickLabel::mouseDoubleClickEvent ( QMouseEvent * e ) @@ -75,6 +75,7 @@ void ClickLabel::mouseDoubleClickEvent ( QMouseEvent * e ) void ClickLabel::setColor(const QColor &col) { +#if 0 QPalette pal = palette(); QColorGroup cg = pal.active(); cg.setColor( QColorGroup::Foreground, col ); @@ -82,6 +83,7 @@ void ClickLabel::setColor(const QColor &col) pal.setInactive( cg ); pal.setDisabled( cg ); setPalette( pal ); +#endif } void ClickLabel::setRed() diff --git a/widgets/clicklabel.h b/widgets/clicklabel.h index 88a5f591..86d71c58 100644 --- a/widgets/clicklabel.h +++ b/widgets/clicklabel.h @@ -52,7 +52,7 @@ #ifndef CLICKLABEL_H #define CLICKLABEL_H -#include +#include class QMouseEvent; @@ -61,7 +61,7 @@ class ClickLabel : public QLabel Q_OBJECT public: - ClickLabel( QWidget * parent, const char * name=0, WFlags f=0 ); + ClickLabel(QWidget *parent); void setRed(); void setGreen(); diff --git a/widgets/distname.cpp b/widgets/distname.cpp index c2c9a5d5..1244b9a7 100644 --- a/widgets/distname.cpp +++ b/widgets/distname.cpp @@ -35,8 +35,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -50,23 +48,14 @@ #include "distname.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include "lib/x509name.h" -#include +#include "lib/base.h" -DistName::DistName( QWidget* parent, const char* name ) - : QWidget( parent, name ) +DistName::DistName(QWidget* parent) + : QWidget(parent) { - if ( !name ) - setName( "DistName" ); - DistNameLayout = new QGridLayout(this); DistNameLayout->setAlignment( Qt::AlignTop ); DistNameLayout->setSpacing( 6 ); @@ -78,11 +67,15 @@ void DistName::setX509name(const x509name &n) QLabel *lb; QLineEdit *le; QStringList sl; + printf("X509name iterate over items\n"); for (int i=0; isetText(sl[1]); + printf("X509 Name = '%s' '%s' '%s' \n", + CCHAR(sl[0]), CCHAR(sl[1]), CCHAR(sl[2])); if (lb->text().isEmpty()) lb->setText(sl[0]); le->setText(sl[2]); @@ -101,19 +94,3 @@ void DistName::resizeEvent( QResizeEvent *e) { QWidget::resizeEvent(e); } - -/*******************************************************************/ - -myGridlayout::myGridlayout(QWidget * parent, int nRows, int nCols, - int margin, int space, const char * name) - :QGridLayout(parent, nRows, nCols, margin, space, name) -{ -} - -QSize myGridlayout::maximumSize() const -{ - QSize s = QGridLayout::maximumSize(); - s.setHeight(32767); - return s; -}; - diff --git a/widgets/distname.h b/widgets/distname.h index c9e57581..6c7d68fc 100644 --- a/widgets/distname.h +++ b/widgets/distname.h @@ -35,8 +35,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -51,8 +49,8 @@ #ifndef DISTNAME_H #define DISTNAME_H -#include -#include +#include +#include class x509name; class QLabel; @@ -65,7 +63,7 @@ class DistName : public QWidget Q_OBJECT public: - DistName( QWidget* parent = 0, const char* name = 0); + DistName(QWidget* parent); ~DistName(); void setX509name(const x509name &n); @@ -74,13 +72,4 @@ class DistName : public QWidget void resizeEvent( QResizeEvent *e); }; - -class myGridlayout : public QGridLayout -{ - Q_OBJECT - public: - myGridlayout(QWidget * parent, int nRows = 1, int nCols = 1, int margin = 0, int space = -1, const char * name = 0 ); - QSize maximumSize() const; -}; - #endif diff --git a/widgets/v3ext.cpp b/widgets/v3ext.cpp index 90a14449..cbdf96c2 100644 --- a/widgets/v3ext.cpp +++ b/widgets/v3ext.cpp @@ -36,8 +36,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -51,22 +49,23 @@ #include "v3ext.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "MainWindow.h" #include "lib/exception.h" -v3ext::v3ext(QWidget *parent, const char *name, bool modal, WFlags f ) - :v3ext_UI(parent, name, modal, f) +v3ext::v3ext(QWidget *parent) + :QDialog(parent) { - setCaption(tr(XCA_TITLE)); - listView->addColumn(tr("Type")); - listView->addColumn(tr("Content")); + QStringList sl; + sl << "Type" << "Content"; + setupUi(this); + setWindowTitle(tr(XCA_TITLE)); + treeWidget->setHeaderLabels(sl); } v3ext::~v3ext() @@ -76,7 +75,7 @@ v3ext::~v3ext() void v3ext::addInfo(QLineEdit *myle, const QStringList &sl, int n, X509 *s, X509 *s1) { - type->insertStringList(sl); + type->addItems(sl); nid = n; le = myle; if (le) @@ -88,9 +87,9 @@ void v3ext::addInfo(QLineEdit *myle, const QStringList &sl, int n, void v3ext::addItem(QString list) { - unsigned int i; + int i; QStringList sl; - sl = sl.split(',', list); + sl = list.split(','); for (i=0; i< sl.count(); i++) addEntry(sl[i]); } @@ -99,21 +98,25 @@ void v3ext::addItem(QString list) void v3ext::addEntry(QString line) { int i; - i = line.find(':'); - new QListViewItem(listView, line.left(i), line.right(line.length()-(i+1))); + QTreeWidgetItem *tw; + + i = line.indexOf(':'); + tw = new QTreeWidgetItem(treeWidget); + tw->setText(0, line.left(i)); + tw->setText(1, line.right(line.length()-(i+1))); } QString v3ext::toString() { + QTreeWidgetItem *tw; QStringList str; - QListViewItem *lvi = listView->firstChild(); - while (lvi != NULL) { + int i; + for (i=0; (tw = treeWidget->topLevelItem(i)); i++) { QString s; - s = lvi->text(0).stripWhiteSpace(); + s = tw->text(0).trimmed(); if (!s.contains(':')) - s += ":" + lvi->text(1).stripWhiteSpace(); - str += s; - lvi = lvi->nextSibling(); + s += ":" + tw->text(1).trimmed(); + str += s; } return str.join(","); } @@ -121,17 +124,21 @@ QString v3ext::toString() void v3ext::delEntry() { - listView->removeItem(listView->currentItem()); + treeWidget->takeTopLevelItem( + treeWidget->indexOfTopLevelItem(treeWidget->currentItem())); } void v3ext::addEntry() { + QTreeWidgetItem *tw; QString typ, cont; + typ = type->currentText(); if ( ! typ.contains(':') ) cont = value->text(); - - new QListViewItem(listView, typ, cont); + tw = new QTreeWidgetItem(treeWidget); + tw->setText(0, typ); + tw->setText(1, cont); } void v3ext::apply() diff --git a/widgets/v3ext.h b/widgets/v3ext.h index 099ea007..bf4f6463 100644 --- a/widgets/v3ext.h +++ b/widgets/v3ext.h @@ -36,8 +36,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -54,18 +52,14 @@ #include "ui/v3ext.h" #include "lib/pki_base.h" -#include -#include -#include +#include +#include #include -#ifndef qt3 -#include -#endif class pki_x509; class pki_key; -class v3ext: public v3ext_UI +class v3ext: public QDialog, public Ui::v3ext { Q_OBJECT private: @@ -74,7 +68,7 @@ class v3ext: public v3ext_UI X509V3_CTX ext_ctx; bool __validate(bool showSuccess); public: - v3ext( QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); + v3ext( QWidget *parent); ~v3ext(); void addItem(QString list); void addEntry(QString list); diff --git a/widgets/validity.cpp b/widgets/validity.cpp index 5d8f4c4f..7066c712 100644 --- a/widgets/validity.cpp +++ b/widgets/validity.cpp @@ -1,3 +1,4 @@ +/* vi: set sw=4 ts=4: */ /* * Copyright (C) 2001 Christian Hohnstaedt. * @@ -35,8 +36,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -50,99 +49,31 @@ #include "validity.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include "lib/asn1time.h" -Validity::Validity( QWidget* parent, const char* name ) - : QWidget( parent, name ) +Validity::Validity( QWidget* parent ) + : QDateTimeEdit( parent ) { - int charw = this->fontMetrics().width('0'); - int space = 10; - -#define CHAR_W(x) (charw * (x) + space) - - QStringList months; - months << tr("Jan") << tr("Feb") << tr("Mar") << tr("Apr") - << tr("May") << tr("Jun") << tr("Jul") << tr("Aug") - << tr("Sep") << tr("Oct") << tr("Nov") << tr("Dec"); - - if ( !name ) - setName( "Validity" ); - ValidityLayout = new QHBoxLayout( this ); - ValidityLayout->setSpacing( 6 ); - ValidityLayout->setMargin( 0 ); - - Mon = new QComboBox( FALSE, this, "Mon" ); - Mon->insertStringList(months); - - Year = new QLineEdit( this, "Year" ); - Year->setMinimumWidth(CHAR_W(4)); - Year->setValidator( new QIntValidator(1000, 9999, this)); - - Day = new QLineEdit( this, "Day" ); - Day->setMinimumWidth(CHAR_W(2)); - Day->setValidator( new QIntValidator(1, 31, this)); - - Hour = new QLineEdit( this, "Hour" ); - Hour->setMinimumWidth(CHAR_W(2)); - Hour->setValidator( new QIntValidator(1, 23, this)); - - Min = new QLineEdit( this, "Min" ); - Min->setMinimumWidth(CHAR_W(2)); - Min->setValidator( new QIntValidator(1, 59, this)); - - Sec = new QLineEdit( this, "Sec" ); - Sec->setMinimumWidth(CHAR_W(2)); - Sec->setValidator( new QIntValidator(1, 59, this)); - - bnNow = new QPushButton(this, "now" ); - bnNow->setMaximumWidth(this->fontMetrics().width("Now") + 16); - bnNow->setText(tr("Now")); - - l1 = new QLabel(":", this, "l1"); - l2 = new QLabel(":", this, "l2"); - - ValidityLayout->addWidget( Day ); - ValidityLayout->addWidget( Mon ); - ValidityLayout->addWidget( Year ); - ValidityLayout->addWidget( Hour ); - ValidityLayout->addWidget( l1 ); - ValidityLayout->addWidget( Min ); - ValidityLayout->addWidget( l2 ); - ValidityLayout->addWidget( Sec ); - ValidityLayout->addWidget( bnNow ); - - connect( bnNow, SIGNAL(clicked()), this, SLOT(setNow())); } Validity::~Validity() { - // no need to delete child widgets, Qt does it all for us } a1time Validity::getDate() const { a1time date; - date.set(Year->text().toInt(), - Mon->currentItem() + 1, - Day->text().toInt(), - Hour->text().toInt(), - Min->text().toInt(), - Sec->text().toInt() - ); + date.set(dateTime().toTime_t()); return date; } void Validity::setDate(const a1time &a, int midnight) { + QDate date; + QTime time; + + int y, m, d, h, min, s, g; QString S; @@ -155,12 +86,13 @@ void Validity::setDate(const a1time &a, int midnight) h=23; min=59; s=59; } - Year->setText(S.sprintf("%02d",y)); - Mon->setCurrentItem(m-1); - Day->setText(S.sprintf("%02d",d)); - Hour->setText(S.sprintf("%02d",h)); - Min->setText(S.sprintf("%02d",min)); - Sec->setText(S.sprintf("%02d",s)); + date.setYMD(y,m,d); + time.setHMS(h,min,s); + + QDateTime dt; + dt.setDate(date); + dt.setTime(time); + setDateTime(dt); } void Validity::setNow() diff --git a/widgets/validity.h b/widgets/validity.h index 65b46f12..90ef39cf 100644 --- a/widgets/validity.h +++ b/widgets/validity.h @@ -35,8 +35,6 @@ * http://www.openssl.org which includes cryptographic software * written by Eric Young (eay@cryptsoft.com)" * - * http://www.sleepycat.com - * * http://www.trolltech.com * * @@ -51,34 +49,21 @@ #ifndef VALIDITY_H #define VALIDITY_H -#include +#include +#include -class QHBoxLayout; -class a1time; -class QComboBox; -class QLineEdit; -class QLabel; -class QPushButton; - -class Validity : public QWidget +class Validity : public QDateTimeEdit { Q_OBJECT public: - Validity( QWidget* parent = 0, const char* name = 0); + Validity( QWidget* parent); ~Validity(); a1time getDate() const; void setDate(const a1time &t, int midnight = 0); public slots: void setNow(); - protected: - QHBoxLayout* ValidityLayout; - QComboBox *Mon; - QLineEdit *Year, *Day, *Hour, *Min, *Sec; - QLabel *l1, *l2; - QPushButton *bnNow; - }; -#endif // VALIDITY_H +#endif diff --git a/xca.pro b/xca.pro index af260520..f3678313 100644 --- a/xca.pro +++ b/xca.pro @@ -1,5 +1,10 @@ -HEADERS = lib/asn1int.h lib/asn1time.h lib/base.h lib/db_base.h lib/db_crl.h lib/db_key.h lib/db_temp.h lib/db_x509.h lib/db_x509req.h lib/db_x509super.h lib/exception.h lib/func.h lib/load_obj.h lib/oid.h lib/pass_info.h lib/pki_base.h lib/pki_crl.h lib/pki_key.h lib/pki_pkcs12.h lib/pki_pkcs7.h lib/pki_temp.h lib/pki_x509.h lib/pki_x509req.h lib/pki_x509super.h lib/x509name.h lib/x509rev.h lib/x509v3ext.h view/CertView.h view/CrlView.h view/KeyView.h view/ReqView.h view/TempView.h view/XcaListView.h widgets/CertDetail.h widgets/CertExtend.h widgets/CrlDetail.h widgets/ExportCert.h widgets/ExportKey.h widgets/ExportTinyCA.h widgets/ImportMulti.h widgets/KeyDetail.h widgets/MainWindow.h widgets/NewX509.h widgets/ReqDetail.h widgets/clicklabel.h widgets/distname.h widgets/validity.h -SOURCES = lib/asn1int.cpp lib/asn1time.cpp lib/db_base.cpp lib/db_crl.cpp lib/db_key.cpp lib/db_temp.cpp lib/db_x509.cpp lib/db_x509req.cpp lib/db_x509super.cpp lib/func.cpp lib/load_obj.cpp lib/main.cpp lib/oid.cpp lib/pass_info.cpp lib/pki_base.cpp lib/pki_crl.cpp lib/pki_key.cpp lib/pki_pkcs12.cpp lib/pki_pkcs7.cpp lib/pki_temp.cpp lib/pki_x509.cpp lib/pki_x509req.cpp lib/pki_x509super.cpp lib/x509name.cpp lib/x509rev.cpp lib/x509v3ext.cpp view/CertView.cpp view/CrlView.cpp view/KeyView.cpp view/ReqView.cpp view/TempView.cpp view/XcaListView.cpp widgets/CertDetail.cpp widgets/CertExtend.cpp widgets/CrlDetail.cpp widgets/ExportCert.cpp widgets/ExportKey.cpp widgets/ExportTinyCA.cpp widgets/ImportMulti.cpp widgets/KeyDetail.cpp widgets/MW_database.cpp widgets/MW_help.cpp widgets/MW_menu.cpp widgets/MainWindow.cpp widgets/NewX509.cpp widgets/NewX509_ext.cpp widgets/ReqDetail.cpp widgets/clicklabel.cpp widgets/distname.cpp widgets/validity.cpp -FORMS = ui/About.ui ui/CertDetail.ui ui/CertExtend.ui ui/CrlDetail.ui ui/ExportCert.ui ui/ExportKey.ui ui/ExportTinyCA.ui ui/Help.ui ui/ImportMulti.ui ui/KeyDetail.ui ui/MainWindow.ui ui/NewKey.ui ui/NewX509.ui ui/PassRead.ui ui/PassWrite.ui ui/ReqDetail.ui ui/TrustState.ui -TRANSLATIONS = lang/xca_de.ts lang/xca_es.ts lang/xca_fr.ts +HEADERS = lib/asn1int.h lib/asn1time.h lib/base.h lib/db_base.h lib/db_crl.h lib/db_key.h lib/db_temp.h lib/db_x509.h lib/db_x509req.h lib/db_x509super.h lib/exception.h lib/func.h lib/load_obj.h lib/oid.h lib/pass_info.h lib/pki_base.h lib/pki_crl.h lib/pki_key.h lib/pki_pkcs12.h lib/pki_pkcs7.h lib/pki_temp.h lib/pki_x509.h lib/pki_x509req.h lib/pki_x509super.h lib/x509name.h lib/x509rev.h lib/x509v3ext.h view/CertView.h view/CrlView.h view/KeyView.h view/ReqView.h view/TempView.h view/XcaListView.h widgets/CertDetail.h widgets/CertExtend.h widgets/clicklabel.h widgets/CrlDetail.h widgets/distname.h widgets/ExportCert.h widgets/ExportKey.h widgets/ExportTinyCA.h widgets/ImportMulti.h widgets/KeyDetail.h widgets/MainWindow.h widgets/NewX509.h widgets/ReqDetail.h widgets/v3ext.h widgets/validity.h +SOURCES = lib/asn1int.cpp lib/asn1time.cpp lib/db_base.cpp lib/db_crl.cpp lib/db_key.cpp lib/db_temp.cpp lib/db_x509.cpp lib/db_x509req.cpp lib/db_x509super.cpp lib/func.cpp lib/load_obj.cpp lib/main.cpp lib/oid.cpp lib/pass_info.cpp lib/pki_base.cpp lib/pki_crl.cpp lib/pki_key.cpp lib/pki_pkcs12.cpp lib/pki_pkcs7.cpp lib/pki_temp.cpp lib/pki_x509.cpp lib/pki_x509req.cpp lib/pki_x509super.cpp lib/x509name.cpp lib/x509rev.cpp lib/x509v3ext.cpp view/CertView.cpp view/CrlView.cpp view/KeyView.cpp view/ReqView.cpp view/TempView.cpp view/XcaListView.cpp widgets/CertDetail.cpp widgets/CertExtend.cpp widgets/clicklabel.cpp widgets/CrlDetail.cpp widgets/distname.cpp widgets/ExportCert.cpp widgets/ExportKey.cpp widgets/ExportTinyCA.cpp widgets/ImportMulti.cpp widgets/KeyDetail.cpp widgets/MainWindow.cpp widgets/MW_database.cpp widgets/MW_help.cpp widgets/MW_menu.cpp widgets/NewX509.cpp widgets/NewX509_ext.cpp widgets/ReqDetail.cpp widgets/v3ext.cpp widgets/validity.cpp +FORMS = ui/About.ui ui/CertDetail.ui ui/CertExtend.ui ui/CrlDetail.ui ui/ExportCert.ui ui/ExportKey.ui ui/ExportTinyCA.ui ui/Help.ui ui/ImportMulti.ui ui/KeyDetail.ui ui/MainWindow.ui ui/NewKey.ui ui/NewX509.ui ui/PassRead.ui ui/PassWrite.ui ui/ReqDetail.ui ui/TrustState.ui ui/v3ext.ui +TRANSLATIONS = lang/xca_de.ts lang/xca_es.ts TARGET = xca + +#The following line was inserted by the Qt porting tool +QT += qt3support +#The following line was inserted by the Qt porting tool +CONFIG += uic3