certificates for QT4

This commit is contained in:
chris2511 2006-03-12 23:57:24 +00:00
parent c6622680db
commit 462eac83a3
77 changed files with 8374 additions and 12367 deletions

View File

@ -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

View File

@ -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

40
configure vendored
View File

@ -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 <<EOF
#include <stdio.h>
#include <openssl/opensslv.h>
#include <db_cxx.h>
#include <qglobal.h>
#include <Qt/qglobal.h>
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

View File

@ -1,5 +1,8 @@
#include "db.h"
#include "base.h"
#ifdef __WIN32__
#include <windows.h>
#else
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/stat.h>
@ -10,6 +13,7 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#endif
#if 0
int main()

View File

@ -52,7 +52,7 @@
#include <Qt/qmessagebox.h>
#include <Qt/qprogressbar.h>
#include <Qt/qstatusbar.h>
#include <Qt/QContextMenuEvent>
#include <Qt/qevent.h>
#include "exception.h"
#include "ui/NewKey.h"

View File

@ -45,13 +45,12 @@
*
* $Id$
*
*/
*/
#include "db_x509.h"
#include "widgets/CertDetail.h"
#include <Qt/qmessagebox.h>
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<pki_x509*>(index.internalPointer());
CertDetail *dlg;
dlg = new CertDetail(mainwin);
if (dlg) {
dlg->setCert(crt);
dlg->exec();
delete dlg;
}
}
#undef FOR_ctr

View File

@ -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

View File

@ -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));

View File

@ -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

View File

@ -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);
}
}

View File

@ -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();

View File

@ -1,176 +1,126 @@
<!DOCTYPE UI><UI>
<class>About_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>About_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>561</width>
<height>392</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string></string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout2</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image1</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>text</name>
<string></string>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer1_2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Done</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer1</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>text</name>
<string></string>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QTextBrowser</class>
<property stdset="1">
<name>name</name>
<cstring>textbox</cstring>
</property>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>PushButton1</sender>
<signal>clicked()</signal>
<receiver>About_UI</receiver>
<slot>accept()</slot>
</connection>
</connections>
</UI>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>About</class>
<widget class="QDialog" name="About" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>561</width>
<height>392</height>
</rect>
</property>
<property name="windowTitle" >
<string/>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="image1" >
<property name="minimumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton1" >
<property name="text" >
<string>Done</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTextBrowser" name="textbox" />
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<resources/>
<connections/>
</ui>

File diff suppressed because it is too large Load Diff

View File

@ -1,448 +1,316 @@
<!DOCTYPE UI><UI>
<class>CertExtend_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>CertExtend_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>671</width>
<height>353</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string></string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>CertExtend</class>
<widget class="QDialog" name="CertExtend" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>393</width>
<height>333</height>
</rect>
</property>
<property name="windowTitle" >
<string/>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QWidget" name="widget" />
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>94</height>
</size>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="TextLabel1" >
<property name="text" >
<string>This will create a new certificate as a copy of the old one with a new serial number and adjusted validity values.</string>
</property>
<property name="wordWrap" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>368</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>Validity</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
<property name="spacing" >
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout16_3_2</cstring>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="TextLabel1_2" >
<property name="text" >
<string>Not before</string>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<spacer>
<property>
<name>name</name>
<cstring>Spacer37_4_2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>200</width>
<height>94</height>
</size>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer38_4_2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</hbox>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="TextLabel2_4" >
<property name="text" >
<string>Not after</string>
</property>
<property stdset="1">
<name>text</name>
<string>This will create a new certificate as a copy of the old one with a new serial number and adjusted validity values.</string>
</property>
<property stdset="1">
<name>alignment</name>
<set>WordBreak|AlignVCenter|AlignLeft</set>
</property>
<property>
<name>wordwrap</name>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer35</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout24</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QGroupBox</class>
<property stdset="1">
<name>name</name>
<cstring>GroupBox8</cstring>
</property>
<property stdset="1">
<name>title</name>
<string>Validity</string>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout16</cstring>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget row="0" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Not before</string>
</property>
</widget>
<widget row="1" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel2_4</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Not after</string>
</property>
</widget>
<widget row="0" column="1" >
<class>Validity</class>
<property stdset="1">
<name>name</name>
<cstring>notBefore</cstring>
</property>
</widget>
<widget row="1" column="1" >
<class>Validity</class>
<property stdset="1">
<name>name</name>
<cstring>notAfter</cstring>
</property>
</widget>
</grid>
</widget>
</hbox>
</widget>
<widget>
<class>QGroupBox</class>
<property stdset="1">
<name>name</name>
<cstring>GroupBox35</cstring>
</property>
<property stdset="1">
<name>title</name>
<string>Time Range</string>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget row="0" column="1" >
<class>QComboBox</class>
<item>
<property>
<name>text</name>
<string>Days</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>Months</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>Years</string>
</property>
</item>
<property stdset="1">
<name>name</name>
<cstring>validRange</cstring>
</property>
</widget>
<widget row="1" column="1" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>applyTime</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Apply</string>
</property>
</widget>
<widget row="1" column="0" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>midnightCB</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Midnight</string>
</property>
</widget>
<widget row="0" column="0" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>validNumber</cstring>
</property>
</widget>
</grid>
</widget>
</hbox>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer36</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout15</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton3</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Cancel</string>
</property>
<property stdset="1">
<name>accel</name>
<number>276824131</number>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer37</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton2</cstring>
</property>
<property stdset="1">
<name>font</name>
<font>
</font>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;OK</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<customwidgets>
<customwidget>
<class>Validity</class>
<header location="local">validity.h</header>
<sizehint>
<width>-1</width>
<height>-1</height>
</sizehint>
<container>1</container>
</widget>
</item>
<item row="0" column="1" >
<widget class="Validity" name="notBefore" />
</item>
<item row="1" column="1" >
<widget class="Validity" name="notAfter" />
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Time range</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="QComboBox" name="validRange" >
<item>
<property name="text" >
<string>Days</string>
</property>
</item>
<item>
<property name="text" >
<string>Months</string>
</property>
</item>
<item>
<property name="text" >
<string>Years</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0" >
<widget class="QCheckBox" name="midnightCB" >
<property name="text" >
<string>Midnight</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLineEdit" name="validNumber" />
</item>
<item row="1" column="1" >
<widget class="QPushButton" name="applyTime" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Apply</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>368</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="PushButton3" >
<property name="sizePolicy" >
<sizepolicy>
<hordata>7</hordata>
<verdata>7</verdata>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<pixmap>image0</pixmap>
</customwidget>
</customwidgets>
<images>
<image>
<name>image0</name>
<data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
</image>
</images>
<connections>
<connection>
<sender>PushButton3</sender>
<signal>clicked()</signal>
<receiver>CertExtend_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>PushButton2</sender>
<signal>clicked()</signal>
<receiver>CertExtend_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>applyTime</sender>
<signal>clicked()</signal>
<receiver>CertExtend_UI</receiver>
<slot>applyTimeDiff()</slot>
</connection>
<slot access="public">applyTimeDiff()</slot>
</connections>
</UI>
</property>
<property name="text" >
<string>&amp;Cancel</string>
</property>
<property name="shortcut" >
<number>276824131</number>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton2" >
<property name="font" >
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>&amp;OK</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
<widget class="QWidget" name="" />
</widget>
<pixmapfunction></pixmapfunction>
<customwidgets>
<customwidget>
<class>Validity</class>
<extends></extends>
<header>validity.h</header>
<container>1</container>
<pixmap></pixmap>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

File diff suppressed because it is too large Load Diff

View File

@ -1,504 +1,414 @@
<!DOCTYPE UI><UI>
<class>ExportCert_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>ExportCert_UI</cstring>
<ui version="4.0" stdsetdef="1" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>ExportCert_UI</class>
<widget class="QDialog" name="ExportCert_UI" >
<property name="objectName" >
<string notr="true" >ExportCert_UI</string>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>482</width>
<height>367</height>
</rect>
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>482</width>
<height>367</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string></string>
<property name="windowTitle" >
<string/>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout9</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel12</cstring>
</property>
<property stdset="1">
<name>font</name>
<font>
<pointsize>14</pointsize>
<bold>1</bold>
<underline>1</underline>
</font>
</property>
<property stdset="1">
<name>text</name>
<string>Certificate export</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer6</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer5</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
</property>
<item>
<widget class="QLabel" name="TextLabel12" >
<property name="objectName" >
<string notr="true" >TextLabel12</string>
</property>
<property name="font" >
<font>
<family></family>
<pointsize>14</pointsize>
<weight>0</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>Certificate export</string>
</property>
</widget>
</item>
<item>
<spacer name="Spacer6" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame6</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget row="1" column="3" >
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>ToolButton1</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>1</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>...</string>
</property>
</widget>
<widget row="1" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel14</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>1</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>Filename</string>
</property>
</widget>
<widget row="1" column="1" rowspan="1" colspan="2" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>filename</cstring>
</property>
</widget>
<widget row="0" column="2" rowspan="1" colspan="2" >
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton3</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>TinyCA filename</string>
</property>
<property>
<name>toolTip</name>
<string>Set the filename to the one used by TinyCA</string>
</property>
</widget>
<widget row="0" column="0" rowspan="1" colspan="2" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel13</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>Please enter the filename for the certificate.</string>
</property>
</widget>
</grid>
</widget>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame5</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>DER is a binary format of the Certificate</string>
</property>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3_3</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>PEM is a base64 encoded Certificate</string>
</property>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3_2</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>PKCS#7 is an official Certificate exchange format</string>
</property>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3_3</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>PKCS#12 is an encrypted official Key-Certificate exchange format</string>
</property>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout4</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Export Format</string>
</property>
</widget>
<widget>
<class>QComboBox</class>
<property stdset="1">
<name>name</name>
<cstring>exportFormat</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer4</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
</property>
<property name="orientation" >
<enum>Horizontal</enum>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="objectName" >
<string notr="true" >image</string>
</property>
<property name="minimumSize" >
<size>
<width>20</width>
<height>20</height>
<width>95</width>
<height>40</height>
</size>
</property>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="Spacer5" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property name="orientation" >
<enum>Vertical</enum>
</property>
</spacer>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout6</cstring>
</item>
<item>
<widget class="Q3Frame" name="Frame6" >
<property name="objectName" >
<string notr="true" >Frame6</string>
</property>
<property name="frameShape" >
<enum>Box</enum>
</property>
<property name="frameShadow" >
<enum>Sunken</enum>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>11</number>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="3" >
<widget class="QToolButton" name="ToolButton1" >
<property name="objectName" >
<string notr="true" >ToolButton1</string>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton9</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Cancel</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer7</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton7</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>OK</string>
</property>
</widget>
</hbox>
<property name="text" >
<string>...</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="TextLabel14" >
<property name="objectName" >
<string notr="true" >TextLabel14</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Filename</string>
</property>
</widget>
</item>
<item rowspan="1" row="1" column="1" colspan="2" >
<widget class="QLineEdit" name="filename" >
<property name="objectName" >
<string notr="true" >filename</string>
</property>
</widget>
</item>
<item rowspan="1" row="0" column="2" colspan="2" >
<widget class="QPushButton" name="PushButton3" >
<property name="objectName" >
<string notr="true" >PushButton3</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>TinyCA filename</string>
</property>
<property name="toolTip" >
<string>Set the filename to the one used by TinyCA</string>
</property>
</widget>
</item>
<item rowspan="1" row="0" column="0" colspan="2" >
<widget class="QLabel" name="TextLabel13" >
<property name="objectName" >
<string notr="true" >TextLabel13</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Please enter the filename for the certificate.</string>
</property>
</widget>
</item>
</layout>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>PushButton7</sender>
<signal>clicked()</signal>
<receiver>ExportCert_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>PushButton9</sender>
<signal>clicked()</signal>
<receiver>ExportCert_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>ToolButton1</sender>
<signal>clicked()</signal>
<receiver>ExportCert_UI</receiver>
<slot>chooseFile()</slot>
</connection>
<connection>
<sender>exportFormat</sender>
<signal>activated(const QString&amp;)</signal>
<receiver>ExportCert_UI</receiver>
<slot>formatChanged()</slot>
</connection>
<connection>
<sender>PushButton3</sender>
<signal>clicked()</signal>
<receiver>ExportCert_UI</receiver>
<slot>setTinyCAfname()</slot>
</connection>
<slot access="public">chooseFile()</slot>
<slot access="public">formatChanged()</slot>
<slot access="public">setTinyCAfname()</slot>
</connections>
<tabstops>
</item>
<item>
<widget class="Q3Frame" name="Frame5" >
<property name="objectName" >
<string notr="true" >Frame5</string>
</property>
<property name="frameShape" >
<enum>Box</enum>
</property>
<property name="frameShadow" >
<enum>Sunken</enum>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel3" >
<property name="objectName" >
<string notr="true" >TextLabel3</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>DER is a binary format of the Certificate</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel3_3" >
<property name="objectName" >
<string notr="true" >TextLabel3_3</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>PEM is a base64 encoded Certificate</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel3_2" >
<property name="objectName" >
<string notr="true" >TextLabel3_2</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>PKCS#7 is an official Certificate exchange format</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel3_3" >
<property name="objectName" >
<string notr="true" >TextLabel3_3</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>PKCS#12 is an encrypted official Key-Certificate exchange format</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel1" >
<property name="objectName" >
<string notr="true" >TextLabel1</string>
</property>
<property name="text" >
<string>Export Format</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="exportFormat" >
<property name="objectName" >
<string notr="true" >exportFormat</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="Spacer4" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property name="orientation" >
<enum>Vertical</enum>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="PushButton9" >
<property name="objectName" >
<string notr="true" >PushButton9</string>
</property>
<property name="text" >
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<spacer name="Spacer7" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property name="orientation" >
<enum>Horizontal</enum>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton7" >
<property name="objectName" >
<string notr="true" >PushButton7</string>
</property>
<property name="text" >
<string>OK</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<tabstops>
<tabstop>filename</tabstop>
<tabstop>PushButton7</tabstop>
<tabstop>PushButton9</tabstop>
</tabstops>
</UI>
</tabstops>
</ui>

View File

@ -1,446 +1,314 @@
<!DOCTYPE UI><UI>
<class>ExportKey_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>ExportKey_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>575</width>
<height>375</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>ExportKey_UI</string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>ExportKey</class>
<widget class="QDialog" name="ExportKey" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>450</width>
<height>388</height>
</rect>
</property>
<property name="windowTitle" >
<string>ExportKey</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel12" >
<property name="font" >
<font>
<family>Arial</family>
<pointsize>14</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>Key export</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="TextLabel13" >
<property name="text" >
<string>Please enter the filename for the key.</string>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_3" >
<property name="frameShape" >
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel14" >
<property name="text" >
<string>Filename</string>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</widget>
</item>
<item>
<widget class="QLineEdit" name="filename" />
</item>
<item>
<widget class="QToolButton" name="fileBut" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout9</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel12</cstring>
</property>
<property stdset="1">
<name>font</name>
<font>
<pointsize>14</pointsize>
<bold>1</bold>
<underline>1</underline>
</font>
</property>
<property stdset="1">
<name>text</name>
<string>Key export</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer6</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel13</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Please enter the filename for the key.</string>
</property>
<property stdset="1">
<name>alignment</name>
<set>WordBreak|AlignVCenter|AlignLeft</set>
</property>
<property>
<name>wordwrap</name>
</property>
</widget>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame5_2</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel14</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Filename</string>
</property>
</widget>
<widget>
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>filename</cstring>
</property>
</widget>
<widget>
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>ToolButton1</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>...</string>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>DER is a binary format of the key without encryption
<property name="text" >
<string>...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel3" >
<property name="text" >
<string>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</string>
</property>
<property stdset="1">
<name>alignment</name>
<set>WordBreak|AlignVCenter|AlignLeft</set>
</property>
<property>
<name>wordwrap</name>
</property>
</widget>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame4</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Export Format</string>
</property>
</widget>
<widget>
<class>QComboBox</class>
<property stdset="1">
<name>name</name>
<cstring>exportFormat</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>When exporting the private key it should be encrypted.</string>
</property>
<property stdset="1">
<name>alignment</name>
<set>WordBreak|AlignVCenter|AlignLeft</set>
</property>
<property>
<name>wordwrap</name>
</property>
</widget>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>privFrame</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>exportPrivate</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>E&amp;xport the private part of the Key too</string>
</property>
<property>
<name>toolTip</name>
<string>When exporting the private part, it should be encrypted.</string>
</property>
</widget>
<widget>
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>encryptKey</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Encrypt the Key with a password</string>
</property>
</widget>
</vbox>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout6</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton9</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Cancel</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer7</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton7</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;OK</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>PushButton7</sender>
<signal>clicked()</signal>
<receiver>ExportKey_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>PushButton9</sender>
<signal>clicked()</signal>
<receiver>ExportKey_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>ToolButton1</sender>
<signal>clicked()</signal>
<receiver>ExportKey_UI</receiver>
<slot>chooseFile()</slot>
</connection>
<connection>
<sender>exportPrivate</sender>
<signal>stateChanged(int)</signal>
<receiver>ExportKey_UI</receiver>
<slot>canEncrypt()</slot>
</connection>
<connection>
<sender>exportFormat</sender>
<signal>activated(int)</signal>
<receiver>ExportKey_UI</receiver>
<slot>canEncrypt()</slot>
</connection>
<connection>
<sender>exportFormat</sender>
<signal>activated(int)</signal>
<receiver>ExportKey_UI</receiver>
<slot>formatChanged()</slot>
</connection>
<slot access="public">canEncrypt()</slot>
<slot access="public">chooseFile()</slot>
<slot access="public">formatChanged()</slot>
<slot access="public">setTinyCAfname()</slot>
</connections>
<tabstops>
<tabstop>filename</tabstop>
<tabstop>exportPrivate</tabstop>
<tabstop>encryptKey</tabstop>
<tabstop>PushButton7</tabstop>
<tabstop>PushButton9</tabstop>
</tabstops>
</UI>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame_2" >
<property name="frameShape" >
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel1" >
<property name="text" >
<string>Export Format</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="exportFormat" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel2" >
<property name="text" >
<string>When exporting the private key it should be encrypted.</string>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="privFrame" >
<property name="frameShape" >
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QCheckBox" name="exportPrivate" >
<property name="toolTip" >
<string>When exporting the private part, it should be encrypted.</string>
</property>
<property name="text" >
<string>E&amp;xport the private part of the Key too</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="encryptKey" >
<property name="enabled" >
<bool>false</bool>
</property>
<property name="text" >
<string>&amp;Encrypt the Key with a password</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="PushButton9" >
<property name="text" >
<string>&amp;Cancel</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton7" >
<property name="text" >
<string>&amp;OK</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<tabstops>
<tabstop>filename</tabstop>
<tabstop>exportPrivate</tabstop>
<tabstop>encryptKey</tabstop>
<tabstop>PushButton7</tabstop>
<tabstop>PushButton9</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>PushButton9</sender>
<signal>clicked()</signal>
<receiver>ExportKey</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>52</x>
<y>360</y>
</hint>
<hint type="destinationlabel" >
<x>155</x>
<y>359</y>
</hint>
</hints>
</connection>
<connection>
<sender>PushButton7</sender>
<signal>clicked()</signal>
<receiver>ExportKey</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>421</x>
<y>364</y>
</hint>
<hint type="destinationlabel" >
<x>278</x>
<y>355</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -1,440 +1,355 @@
<!DOCTYPE UI><UI>
<class>ExportTinyCA_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>ExportTinyCA_UI</cstring>
<ui version="4.0" stdsetdef="1" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>ExportTinyCA_UI</class>
<widget class="QDialog" name="ExportTinyCA_UI" >
<property name="objectName" >
<string notr="true" >ExportTinyCA_UI</string>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>581</width>
<height>300</height>
</rect>
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>581</width>
<height>300</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string></string>
<property name="windowTitle" >
<string/>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout9_2</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel12_2</cstring>
</property>
<property stdset="1">
<name>font</name>
<font>
<pointsize>14</pointsize>
<bold>1</bold>
<underline>1</underline>
</font>
</property>
<property stdset="1">
<name>text</name>
<string>TinyCA export</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer6_2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image_2</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer10</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
</property>
<item>
<widget class="QLabel" name="TextLabel12_2" >
<property name="objectName" >
<string notr="true" >TextLabel12_2</string>
</property>
<property name="font" >
<font>
<family></family>
<pointsize>14</pointsize>
<weight>0</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>TinyCA export</string>
</property>
</widget>
</item>
<item>
<spacer name="Spacer6_2" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame5_2</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel14</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Templatedir</string>
</property>
</widget>
<widget>
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>tempdir</cstring>
</property>
<property>
<name>toolTip</name>
<string>The directory, where the openssl.cnf template can be found</string>
</property>
</widget>
<widget>
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>ToolButton1</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>...</string>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame5_2_2</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel14_2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>TinyCA Directory</string>
</property>
</widget>
<widget>
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>tinycadir</cstring>
</property>
<property>
<name>toolTip</name>
<string>the TinyCA database directory, usually: ~/.TinyCA/</string>
</property>
</widget>
<widget>
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>ToolButton1_2</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>...</string>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame5_2_2_2</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel14_2_2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Name</string>
</property>
</widget>
<widget>
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>dname</cstring>
</property>
<property>
<name>toolTip</name>
<string>The name of CA </string>
</property>
</widget>
<widget>
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>ToolButton1_2_2</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>...</string>
</property>
</widget>
</hbox>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer8</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
</property>
<property name="orientation" >
<enum>Horizontal</enum>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image_2" >
<property name="objectName" >
<string notr="true" >image_2</string>
</property>
<property name="minimumSize" >
<size>
<width>20</width>
<height>20</height>
<width>95</width>
<height>40</height>
</size>
</property>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="Spacer10" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property name="orientation" >
<enum>Vertical</enum>
</property>
</spacer>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout6</cstring>
</item>
<item>
<widget class="Q3Frame" name="Frame5_2" >
<property name="objectName" >
<string notr="true" >Frame5_2</string>
</property>
<property name="frameShape" >
<enum>Box</enum>
</property>
<property name="frameShadow" >
<enum>Sunken</enum>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel14" >
<property name="objectName" >
<string notr="true" >TextLabel14</string>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
<property name="text" >
<string>Templatedir</string>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton9</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Cancel</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer7</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton7</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;OK</string>
</property>
</widget>
</hbox>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tempdir" >
<property name="objectName" >
<string notr="true" >tempdir</string>
</property>
<property name="toolTip" >
<string>The directory, where the openssl.cnf template can be found</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="ToolButton1" >
<property name="objectName" >
<string notr="true" >ToolButton1</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>...</string>
</property>
</widget>
</item>
</layout>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>PushButton9</sender>
<signal>clicked()</signal>
<receiver>ExportTinyCA_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>PushButton7</sender>
<signal>clicked()</signal>
<receiver>ExportTinyCA_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>ToolButton1_2</sender>
<signal>clicked()</signal>
<receiver>ExportTinyCA_UI</receiver>
<slot>chooseTinyCaDir()</slot>
</connection>
<connection>
<sender>ToolButton1</sender>
<signal>clicked()</signal>
<receiver>ExportTinyCA_UI</receiver>
<slot>chooseTempDir()</slot>
</connection>
<slot access="public">chooseTempDir()</slot>
<slot access="public">chooseTinyCaDir()</slot>
</connections>
</UI>
</item>
<item>
<widget class="Q3Frame" name="Frame5_2_2" >
<property name="objectName" >
<string notr="true" >Frame5_2_2</string>
</property>
<property name="frameShape" >
<enum>Box</enum>
</property>
<property name="frameShadow" >
<enum>Sunken</enum>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel14_2" >
<property name="objectName" >
<string notr="true" >TextLabel14_2</string>
</property>
<property name="text" >
<string>TinyCA Directory</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="tinycadir" >
<property name="objectName" >
<string notr="true" >tinycadir</string>
</property>
<property name="toolTip" >
<string>the TinyCA database directory, usually: ~/.TinyCA/</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="ToolButton1_2" >
<property name="objectName" >
<string notr="true" >ToolButton1_2</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="Q3Frame" name="Frame5_2_2_2" >
<property name="objectName" >
<string notr="true" >Frame5_2_2_2</string>
</property>
<property name="frameShape" >
<enum>Box</enum>
</property>
<property name="frameShadow" >
<enum>Sunken</enum>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel14_2_2" >
<property name="objectName" >
<string notr="true" >TextLabel14_2_2</string>
</property>
<property name="text" >
<string>Name</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="dname" >
<property name="objectName" >
<string notr="true" >dname</string>
</property>
<property name="toolTip" >
<string>The name of CA </string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="ToolButton1_2_2" >
<property name="objectName" >
<string notr="true" >ToolButton1_2_2</string>
</property>
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="Spacer8" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property name="orientation" >
<enum>Vertical</enum>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="PushButton9" >
<property name="objectName" >
<string notr="true" >PushButton9</string>
</property>
<property name="text" >
<string>&amp;Cancel</string>
</property>
</widget>
</item>
<item>
<spacer name="Spacer7" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property name="orientation" >
<enum>Horizontal</enum>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton7" >
<property name="objectName" >
<string notr="true" >PushButton7</string>
</property>
<property name="text" >
<string>&amp;OK</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
</ui>

View File

@ -1,147 +1,92 @@
<!DOCTYPE UI><UI>
<class>Help_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>Help_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>737</width>
<height>619</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string></string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout6</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>back</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&lt;&lt;</string>
</property>
<property stdset="1">
<name>autoDefault</name>
<bool>true</bool>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>forward</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&gt;&gt;</string>
</property>
<property stdset="1">
<name>autoDefault</name>
<bool>true</bool>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Horizontal Spacing2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonOk</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Done</string>
</property>
<property stdset="1">
<name>autoDefault</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>default</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QTextBrowser</class>
<property stdset="1">
<name>name</name>
<cstring>textbox</cstring>
</property>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>buttonOk</sender>
<signal>clicked()</signal>
<receiver>Help_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>back</sender>
<signal>clicked()</signal>
<receiver>textbox</receiver>
<slot>backward()</slot>
</connection>
<connection>
<sender>forward</sender>
<signal>clicked()</signal>
<receiver>textbox</receiver>
<slot>forward()</slot>
</connection>
</connections>
</UI>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>Help</class>
<widget class="QDialog" name="Help" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>737</width>
<height>619</height>
</rect>
</property>
<property name="windowTitle" >
<string/>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="back" >
<property name="text" >
<string>&lt;&lt;</string>
</property>
<property name="autoDefault" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="forward" >
<property name="text" >
<string>>></string>
</property>
<property name="autoDefault" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="buttonOk" >
<property name="text" >
<string>&amp;Done</string>
</property>
<property name="autoDefault" >
<bool>true</bool>
</property>
<property name="default" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTextBrowser" name="textbox" />
</item>
</layout>
</widget>
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<resources/>
<connections/>
</ui>

View File

@ -1,196 +1,107 @@
<!DOCTYPE UI><UI>
<class>ImportMulti_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>ImportMulti_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>666</width>
<height>328</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>ImportMulti_UI</string>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>ImportMulti</class>
<widget class="QDialog" name="ImportMulti" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>506</width>
<height>289</height>
</rect>
</property>
<property name="windowTitle" >
<string>ImportMulti_UI</string>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QListView" name="listView" />
</item>
<item>
<widget class="QFrame" name="frame" >
<property name="frameShape" >
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="buttonOk" >
<property name="text" >
<string>Import &amp;All</string>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</widget>
</item>
<item>
<widget class="QPushButton" name="PushButton4" >
<property name="text" >
<string>&amp;Import</string>
</property>
<widget>
<class>QListView</class>
<property stdset="1">
<name>name</name>
<cstring>itemView</cstring>
</property>
</widget>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame9</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonOk</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Import &amp;All</string>
</property>
<property stdset="1">
<name>autoDefault</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>default</name>
<bool>true</bool>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton4</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Import</string>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonCancel</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Done</string>
</property>
<property stdset="1">
<name>autoDefault</name>
<bool>true</bool>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton9</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Remove</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer1</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>200</width>
<height>94</height>
</size>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
</vbox>
</widget>
</hbox>
</widget>
<connections>
<connection>
<sender>buttonCancel</sender>
<signal>clicked()</signal>
<receiver>ImportMulti_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>itemView</sender>
<signal>rightButtonClicked(QListViewItem*,const QPoint&amp;,int)</signal>
<receiver>ImportMulti_UI</receiver>
<slot>showPopupMenu(QListViewItem *, const QPoint &amp;, int)</slot>
</connection>
<connection>
<sender>PushButton4</sender>
<signal>clicked()</signal>
<receiver>ImportMulti_UI</receiver>
<slot>import()</slot>
</connection>
<connection>
<sender>buttonOk</sender>
<signal>clicked()</signal>
<receiver>ImportMulti_UI</receiver>
<slot>importAll()</slot>
</connection>
<connection>
<sender>PushButton9</sender>
<signal>clicked()</signal>
<receiver>ImportMulti_UI</receiver>
<slot>remove()</slot>
</connection>
<slot access="public">import()</slot>
<slot access="public">importAll()</slot>
<slot access="public">remove()</slot>
<slot access="public">showPopupMenu(QListViewItem *, const QPoint &amp;, int)</slot>
</connections>
</UI>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonCancel" >
<property name="text" >
<string>&amp;Done</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="PushButton9" >
<property name="text" >
<string>&amp;Remove</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>204</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<size>
<width>200</width>
<height>94</height>
</size>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -1,440 +1,340 @@
<!DOCTYPE UI><UI>
<class>KeyDetail_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>KeyDetail_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>538</width>
<height>473</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>KeyDetail_UI</string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout8</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>tlHeader</cstring>
</property>
<property stdset="1">
<name>font</name>
<font>
<pointsize>14</pointsize>
<bold>1</bold>
<underline>1</underline>
</font>
</property>
<property stdset="1">
<name>text</name>
<string>Details of the RSA key</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer5</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>MShape</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>MShadow</enum>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout10</cstring>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget row="0" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Name</string>
</property>
</widget>
<widget row="2" column="1" >
<class>ClickLabel</class>
<property stdset="1">
<name>name</name>
<cstring>keyPrivEx</cstring>
</property>
</widget>
<widget row="0" column="1" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>keyDesc</cstring>
</property>
<property stdset="1">
<name>maxLength</name>
<number>32767</number>
</property>
<property>
<name>toolTip</name>
<string>The internal name of the key used by xca</string>
</property>
</widget>
<widget row="1" column="1" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout9</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>keyPubEx</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Panel</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<property>
<name>toolTip</name>
<string></string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer3</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Keysize</string>
</property>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>keyLength</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Panel</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
</widget>
</hbox>
</widget>
<widget row="2" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>tlPrivEx</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Private Exponent</string>
</property>
</widget>
<widget row="1" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>tlPubEx</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Public Exponent</string>
</property>
</widget>
</grid>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>tlModulus</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>Modulus</string>
</property>
</widget>
<widget>
<class>QTextView</class>
<property stdset="1">
<name>name</name>
<cstring>keyModulus</cstring>
</property>
<property stdset="1">
<name>textFormat</name>
<enum>PlainText</enum>
</property>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout25</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>but_cancel</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Cancel</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer4</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>but_ok</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;OK</string>
</property>
<property stdset="1">
<name>flat</name>
<bool>false</bool>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<customwidgets>
<customwidget>
<class>ClickLabel</class>
<header location="local">clicklabel.h</header>
<sizehint>
<width>100</width>
<height>26</height>
</sizehint>
<container>0</container>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>KeyDetail</class>
<widget class="QDialog" name="KeyDetail" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>538</width>
<height>419</height>
</rect>
</property>
<property name="windowTitle" >
<string>KeyDetail</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="tlHeader" >
<property name="font" >
<font>
<family>Arial</family>
<pointsize>14</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>Details of the RSA key</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="sizePolicy" >
<sizepolicy>
<hordata>7</hordata>
<verdata>0</verdata>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<pixmap>image0</pixmap>
</customwidget>
</customwidgets>
<images>
<image>
<name>image0</name>
<data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
</image>
</images>
<connections>
<connection>
<sender>but_cancel</sender>
<signal>clicked()</signal>
<receiver>KeyDetail_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>but_ok</sender>
<signal>clicked()</signal>
<receiver>KeyDetail_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>but_ok</sender>
<signal>clicked()</signal>
<receiver>KeyDetail_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>keyDesc</sender>
<signal>returnPressed()</signal>
<receiver>KeyDetail_UI</receiver>
<slot>accept()</slot>
</connection>
</connections>
</UI>
</property>
<property name="minimumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="TextLabel1" >
<property name="text" >
<string>Name</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="keyDesc" >
<property name="toolTip" >
<string>The internal name of the key used by xca</string>
</property>
<property name="maxLength" >
<number>32767</number>
</property>
</widget>
</item>
<item row="1" column="1" >
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="keyPubEx" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="TextLabel3" >
<property name="text" >
<string>Keysize</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="keyLength" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0" >
<widget class="QLabel" name="tlPrivEx" >
<property name="text" >
<string>Private Exponent</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="tlPubEx" >
<property name="text" >
<string>Public Exponent</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="ClickLabel" name="keyPrivEx" />
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="tlModulus" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>Modulus</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="keyModulus" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" >
<enum>QFrame::Panel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<property name="text" >
<string/>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="but_ok" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>&amp;OK</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>151</width>
<height>29</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
<widget class="QWidget" name="widget" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
</rect>
</property>
</widget>
</widget>
<pixmapfunction></pixmapfunction>
<customwidgets>
<customwidget>
<class>ClickLabel</class>
<extends>QWidget</extends>
<header>widgets/clicklabel.h</header>
<container>0</container>
<pixmap></pixmap>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>but_ok</sender>
<signal>clicked()</signal>
<receiver>KeyDetail</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>201</x>
<y>385</y>
</hint>
<hint type="destinationlabel" >
<x>57</x>
<y>388</y>
</hint>
</hints>
</connection>
</connections>
</ui>

File diff suppressed because it is too large Load Diff

View File

@ -1,371 +1,286 @@
<!DOCTYPE UI><UI>
<class>NewKey_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>NewKey_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>364</width>
<height>244</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>NewKey</class>
<widget class="QDialog" name="NewKey" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>420</width>
<height>256</height>
</rect>
</property>
<property name="windowTitle" >
<string>New key</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel6" >
<property name="font" >
<font>
<family>Arial</family>
<pointsize>14</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>New key</string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="TextLabel1" >
<property name="text" >
<string>Please give a name to the new key and select the desired keysize</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Key properties</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="TextLabel5" >
<property name="text" >
<string>Name</string>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="TextLabel2" >
<property name="text" >
<string>Keysize</string>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout4</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel6</cstring>
</property>
<property stdset="1">
<name>font</name>
<font>
<pointsize>14</pointsize>
<bold>1</bold>
<underline>1</underline>
</font>
</property>
<property stdset="1">
<name>text</name>
<string>New key</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer1</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>text</name>
<string></string>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Please give a name to the new key and select the desired keysize</string>
</property>
<property stdset="1">
<name>alignment</name>
<set>WordBreak|AlignVCenter|AlignLeft</set>
</property>
<property>
<name>wordwrap</name>
</property>
</widget>
<widget>
<class>QGroupBox</class>
<property stdset="1">
<name>name</name>
<cstring>GroupBox4</cstring>
</property>
<property stdset="1">
<name>title</name>
<string>Key properties</string>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget row="0" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel5</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Name</string>
</property>
</widget>
<widget row="1" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Keysize</string>
</property>
</widget>
<widget row="0" column="1" rowspan="1" colspan="3" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>keyDesc</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>32767</width>
<height>32767</height>
</size>
</property>
<property stdset="1">
<name>text</name>
<string>New Key</string>
</property>
<property>
<name>toolTip</name>
<string>The internal name of the new key</string>
</property>
</widget>
<widget row="1" column="1" >
<class>QComboBox</class>
<property stdset="1">
<name>name</name>
<cstring>keyLength</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
</sizepolicy>
</property>
<property>
<name>toolTip</name>
<string>Usually 1024 or 2048 bit keys are used</string>
</property>
</widget>
<widget row="1" column="3" >
<class>QComboBox</class>
<item>
<property>
<name>text</name>
<string>RSA</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>DSA</string>
</property>
</item>
<property stdset="1">
<name>name</name>
<cstring>keyType</cstring>
</property>
</widget>
<widget row="1" column="2" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Keytype</string>
</property>
</widget>
</grid>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer3</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout28</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Cancel</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>C&amp;reate</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>PushButton2</sender>
<signal>clicked()</signal>
<receiver>NewKey_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>PushButton1</sender>
<signal>clicked()</signal>
<receiver>NewKey_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>PushButton1</sender>
<signal>stateChanged(int)</signal>
<receiver>NewKey_UI</receiver>
<slot>generateKey()</slot>
</connection>
<connection>
<sender>keyDesc</sender>
<signal>returnPressed()</signal>
<receiver>NewKey_UI</receiver>
<slot>accept()</slot>
</connection>
<slot access="public">generateKey()</slot>
</connections>
<tabstops>
<tabstop>keyDesc</tabstop>
<tabstop>keyLength</tabstop>
<tabstop>PushButton1</tabstop>
<tabstop>PushButton2</tabstop>
</tabstops>
</UI>
</widget>
</item>
<item row="1" column="3" >
<widget class="QComboBox" name="keyType" >
<item>
<property name="text" >
<string>RSA</string>
</property>
</item>
<item>
<property name="text" >
<string>DSA</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="keyLength" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip" >
<string>Usually 1024 or 2048 bit keys are used</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="3" >
<widget class="QLineEdit" name="keyDesc" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>32767</width>
<height>32767</height>
</size>
</property>
<property name="toolTip" >
<string>The internal name of the new key</string>
</property>
<property name="text" >
<string>New Key</string>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QLabel" name="TextLabel1_2" >
<property name="text" >
<string>Keytype</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>351</width>
<height>16</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="PushButton2" >
<property name="text" >
<string>&amp;Cancel</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton1" >
<property name="text" >
<string>C&amp;reate</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<tabstops>
<tabstop>keyDesc</tabstop>
<tabstop>keyLength</tabstop>
<tabstop>keyType</tabstop>
<tabstop>PushButton1</tabstop>
<tabstop>PushButton2</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>PushButton1</sender>
<signal>clicked()</signal>
<receiver>NewKey</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>395</x>
<y>228</y>
</hint>
<hint type="destinationlabel" >
<x>244</x>
<y>211</y>
</hint>
</hints>
</connection>
<connection>
<sender>PushButton2</sender>
<signal>clicked()</signal>
<receiver>NewKey</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>29</x>
<y>227</y>
</hint>
<hint type="destinationlabel" >
<x>107</x>
<y>200</y>
</hint>
</hints>
</connection>
</connections>
</ui>

File diff suppressed because it is too large Load Diff

View File

@ -1,288 +1,252 @@
<!DOCTYPE UI><UI>
<class>PassRead_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>PassRead_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>472</width>
<height>184</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>PassRead</class>
<widget class="QDialog" name="PassRead" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>339</width>
<height>192</height>
</rect>
</property>
<property name="windowTitle" >
<string>Password</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="title" >
<property name="font" >
<font>
<family>Arial</family>
<pointsize>14</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>Password</string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="description" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>32767</width>
<height>32767</height>
</size>
</property>
<property name="font" >
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string/>
</property>
<property name="scaledContents" >
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame" >
<property name="frameShape" >
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="TextLabel1" >
<property name="text" >
<string>Password</string>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</widget>
</item>
<item>
<widget class="QLineEdit" name="pass" >
<property name="echoMode" >
<enum>QLineEdit::Password</enum>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout16</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>title</cstring>
</property>
<property stdset="1">
<name>font</name>
<font>
<pointsize>14</pointsize>
<bold>1</bold>
<underline>1</underline>
</font>
</property>
<property stdset="1">
<name>text</name>
<string>Password</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer4</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>description</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>32767</width>
<height>32767</height>
</size>
</property>
<property stdset="1">
<name>font</name>
<font>
</font>
</property>
<property stdset="1">
<name>text</name>
<string></string>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>alignment</name>
<set>AlignVCenter|AlignLeft</set>
</property>
<property>
<name>wordwrap</name>
</property>
</widget>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame22</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Password</string>
</property>
</widget>
<widget>
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>pass</cstring>
</property>
<property stdset="1">
<name>echoMode</name>
<enum>Password</enum>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout12</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Cancel</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer1</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;OK</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>PushButton1</sender>
<signal>clicked()</signal>
<receiver>PassRead_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>PushButton2</sender>
<signal>clicked()</signal>
<receiver>PassRead_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>pass</sender>
<signal>returnPressed()</signal>
<receiver>PassRead_UI</receiver>
<slot>accept()</slot>
</connection>
</connections>
<tabstops>
<tabstop>pass</tabstop>
<tabstop>PushButton1</tabstop>
<tabstop>PushButton2</tabstop>
</tabstops>
</UI>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="PushButton2" >
<property name="text" >
<string>&amp;Cancel</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton1" >
<property name="text" >
<string>&amp;OK</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<tabstops>
<tabstop>pass</tabstop>
<tabstop>PushButton1</tabstop>
<tabstop>PushButton2</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>pass</sender>
<signal>returnPressed()</signal>
<receiver>PassRead</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>148</x>
<y>123</y>
</hint>
<hint type="destinationlabel" >
<x>158</x>
<y>157</y>
</hint>
</hints>
</connection>
<connection>
<sender>PushButton1</sender>
<signal>clicked()</signal>
<receiver>PassRead</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>307</x>
<y>172</y>
</hint>
<hint type="destinationlabel" >
<x>258</x>
<y>162</y>
</hint>
</hints>
</connection>
<connection>
<sender>PushButton2</sender>
<signal>clicked()</signal>
<receiver>PassRead</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>28</x>
<y>167</y>
</hint>
<hint type="destinationlabel" >
<x>110</x>
<y>161</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -1,340 +1,267 @@
<!DOCTYPE UI><UI>
<class>PassWrite_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>PassWrite_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>474</width>
<height>236</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>PassWrite</class>
<widget class="QDialog" name="PassWrite" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>474</width>
<height>243</height>
</rect>
</property>
<property name="windowTitle" >
<string>Password</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QLabel" name="title" >
<property name="font" >
<font>
<family>Arial</family>
<pointsize>14</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>Password</string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="minimumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="description" >
<property name="text" >
<string/>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame" >
<property name="frameShape" >
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Sunken</enum>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="TextLabel2" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
<property name="maximumSize" >
<size>
<width>32767</width>
<height>32767</height>
</size>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout4</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>title</cstring>
</property>
<property stdset="1">
<name>font</name>
<font>
<pointsize>14</pointsize>
<bold>1</bold>
<underline>1</underline>
</font>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>MShape</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>MShadow</enum>
</property>
<property stdset="1">
<name>text</name>
<string>Password</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer4</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>description</cstring>
</property>
<property stdset="1">
<name>text</name>
<string></string>
</property>
<property stdset="1">
<name>alignment</name>
<set>WordBreak|AlignVCenter|AlignLeft</set>
</property>
<property>
<name>wordwrap</name>
</property>
</widget>
<widget>
<class>QFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame3</cstring>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>Box</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>Sunken</enum>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget row="1" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel2</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>32767</width>
<height>32767</height>
</size>
</property>
<property stdset="1">
<name>font</name>
<font>
</font>
</property>
<property stdset="1">
<name>frameShape</name>
<enum>MShape</enum>
</property>
<property stdset="1">
<name>frameShadow</name>
<enum>MShadow</enum>
</property>
<property stdset="1">
<name>text</name>
<string>Repeat password</string>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>false</bool>
</property>
</widget>
<widget row="0" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Password</string>
</property>
<property stdset="1">
<name>alignment</name>
<set>AlignVCenter|AlignLeft</set>
</property>
<property>
<name>wordwrap</name>
</property>
</widget>
<widget row="1" column="1" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>passB</cstring>
</property>
<property stdset="1">
<name>echoMode</name>
<enum>Password</enum>
</property>
</widget>
<widget row="0" column="1" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>passA</cstring>
</property>
<property stdset="1">
<name>echoMode</name>
<enum>Password</enum>
</property>
</widget>
</grid>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout15</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Cancel</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;OK</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>PushButton1</sender>
<signal>clicked()</signal>
<receiver>PassWrite_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>PushButton2</sender>
<signal>clicked()</signal>
<receiver>PassWrite_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>passA</sender>
<signal>returnPressed()</signal>
<receiver>passB</receiver>
<slot>setFocus()</slot>
</connection>
<connection>
<sender>passB</sender>
<signal>returnPressed()</signal>
<receiver>PassWrite_UI</receiver>
<slot>accept()</slot>
</connection>
</connections>
<tabstops>
<tabstop>passA</tabstop>
<tabstop>passB</tabstop>
<tabstop>PushButton1</tabstop>
<tabstop>PushButton2</tabstop>
</tabstops>
</UI>
<property name="font" >
<font>
<family></family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>Repeat password</string>
</property>
<property name="scaledContents" >
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QLineEdit" name="passA" >
<property name="echoMode" >
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QLineEdit" name="passB" >
<property name="echoMode" >
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="TextLabel1" >
<property name="text" >
<string>Password</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="PushButton2" >
<property name="text" >
<string>&amp;Cancel</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton1" >
<property name="text" >
<string>&amp;OK</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<tabstops>
<tabstop>passA</tabstop>
<tabstop>passB</tabstop>
<tabstop>PushButton1</tabstop>
<tabstop>PushButton2</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>PushButton1</sender>
<signal>clicked()</signal>
<receiver>PassWrite</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>442</x>
<y>212</y>
</hint>
<hint type="destinationlabel" >
<x>379</x>
<y>212</y>
</hint>
</hints>
</connection>
<connection>
<sender>PushButton2</sender>
<signal>clicked()</signal>
<receiver>PassWrite</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<x>45</x>
<y>209</y>
</hint>
<hint type="destinationlabel" >
<x>170</x>
<y>207</y>
</hint>
</hints>
</connection>
<connection>
<sender>passB</sender>
<signal>returnPressed()</signal>
<receiver>PassWrite</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<x>207</x>
<y>178</y>
</hint>
<hint type="destinationlabel" >
<x>252</x>
<y>42</y>
</hint>
</hints>
</connection>
</connections>
</ui>

File diff suppressed because it is too large Load Diff

View File

@ -1,325 +1,258 @@
<!DOCTYPE UI><UI>
<class>TrustState_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>TrustState_UI</cstring>
<ui version="4.0" stdsetdef="1" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>TrustState_UI</class>
<widget class="QDialog" name="TrustState_UI" >
<property name="objectName" >
<string notr="true" >TrustState_UI</string>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>455</width>
<height>267</height>
</rect>
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>455</width>
<height>267</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string></string>
<property name="windowTitle" >
<string/>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout4</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>font</name>
<font>
<pointsize>14</pointsize>
<bold>1</bold>
<underline>1</underline>
</font>
</property>
<property stdset="1">
<name>text</name>
<string>Set Trustment of the Certificate</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer1</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>image</cstring>
</property>
<property stdset="1">
<name>minimumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>maximumSize</name>
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property stdset="1">
<name>text</name>
<string></string>
</property>
<property stdset="1">
<name>scaledContents</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>alignment</name>
<set>AlignVCenter|AlignLeft</set>
</property>
<property>
<name>wordwrap</name>
</property>
</widget>
</hbox>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer15</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
</property>
<item>
<widget class="QLabel" name="TextLabel1" >
<property name="objectName" >
<string notr="true" >TextLabel1</string>
</property>
<property name="font" >
<font>
<family></family>
<pointsize>14</pointsize>
<weight>0</weight>
<italic>false</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text" >
<string>Set Trustment of the Certificate</string>
</property>
</widget>
</item>
<item>
<spacer name="Spacer1" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>ClickLabel</class>
<property stdset="1">
<name>name</name>
<cstring>certName</cstring>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer5</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
</property>
<property name="orientation" >
<enum>Horizontal</enum>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="image" >
<property name="objectName" >
<string notr="true" >image</string>
</property>
<property name="minimumSize" >
<size>
<width>20</width>
<height>20</height>
<width>95</width>
<height>40</height>
</size>
</property>
</property>
<property name="maximumSize" >
<size>
<width>95</width>
<height>40</height>
</size>
</property>
<property name="text" >
<string/>
</property>
<property name="scaledContents" >
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="Spacer15" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property name="orientation" >
<enum>Vertical</enum>
</property>
</spacer>
<widget>
<class>QButtonGroup</class>
<property stdset="1">
<name>name</name>
<cstring>ButtonGroup2</cstring>
</property>
<property stdset="1">
<name>title</name>
<string>Select the Truststate</string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QRadioButton</class>
<property stdset="1">
<name>name</name>
<cstring>trust0</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Never trust this certificate</string>
</property>
</widget>
<widget>
<class>QRadioButton</class>
<property stdset="1">
<name>name</name>
<cstring>trust1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Only &amp;trust this certificate, if we trust the signer</string>
</property>
</widget>
<widget>
<class>QRadioButton</class>
<property stdset="1">
<name>name</name>
<cstring>trust2</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Always trust this certificate</string>
</property>
</widget>
</vbox>
</item>
<item>
<widget class="ClickLabel" name="certName" >
<property name="objectName" >
<string notr="true" >certName</string>
</property>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout22</cstring>
</item>
<item>
<spacer name="Spacer5" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property name="orientation" >
<enum>Vertical</enum>
</property>
</spacer>
</item>
<item>
<widget class="Q3ButtonGroup" name="ButtonGroup2" >
<property name="objectName" >
<string notr="true" >ButtonGroup2</string>
</property>
<property name="title" >
<string>Select the Truststate</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>11</number>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QRadioButton" name="trust0" >
<property name="objectName" >
<string notr="true" >trust0</string>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
<property name="text" >
<string>&amp;Never trust this certificate</string>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton5</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;Cancel</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer4</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton4</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>&amp;OK</string>
</property>
</widget>
</hbox>
</widget>
</item>
<item>
<widget class="QRadioButton" name="trust1" >
<property name="objectName" >
<string notr="true" >trust1</string>
</property>
<property name="text" >
<string>Only &amp;trust this certificate, if we trust the signer</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="trust2" >
<property name="objectName" >
<string notr="true" >trust2</string>
</property>
<property name="text" >
<string>&amp;Always trust this certificate</string>
</property>
</widget>
</item>
</layout>
</widget>
</vbox>
</widget>
<customwidgets>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="PushButton5" >
<property name="objectName" >
<string notr="true" >PushButton5</string>
</property>
<property name="text" >
<string>&amp;Cancel</string>
</property>
</widget>
</item>
<item>
<spacer name="Spacer4" >
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="sizeType" >
<enum>Expanding</enum>
</property>
<property name="orientation" >
<enum>Horizontal</enum>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton4" >
<property name="objectName" >
<string notr="true" >PushButton4</string>
</property>
<property name="text" >
<string>&amp;OK</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<customwidgets>
<customwidget>
<class>ClickLabel</class>
<header location="local">clicklabel.h</header>
<sizehint>
<width>100</width>
<height>26</height>
</sizehint>
<container>0</container>
<sizepolicy>
<hordata>7</hordata>
<verdata>0</verdata>
</sizepolicy>
<pixmap>image0</pixmap>
<class>ClickLabel</class>
<extends></extends>
<header location="local" >clicklabel.h</header>
<sizehint>
<width>100</width>
<height>26</height>
</sizehint>
<container>0</container>
<sizepolicy>
<hordata>7</hordata>
<verdata>0</verdata>
</sizepolicy>
<pixmap>image0</pixmap>
</customwidget>
</customwidgets>
<images>
<image>
<name>image0</name>
<data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
</customwidgets>
<images>
<image name="image0" >
<data format="XPM.GZ" length="646" >789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
</image>
</images>
<connections>
<connection>
<sender>PushButton4</sender>
<signal>clicked()</signal>
<receiver>TrustState_UI</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>PushButton5</sender>
<signal>clicked()</signal>
<receiver>TrustState_UI</receiver>
<slot>reject()</slot>
</connection>
</connections>
</UI>
</images>
</ui>

View File

@ -1,200 +1,110 @@
<!DOCTYPE UI><UI>
<class>v3ext_UI</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>v3ext_UI</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
<width>499</width>
<height>255</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>Form1</string>
</property>
<vbox>
<property stdset="1">
<name>margin</name>
<number>11</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout1</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QComboBox</class>
<property stdset="1">
<name>name</name>
<cstring>type</cstring>
</property>
</widget>
<widget>
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>value</cstring>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonAdd</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Add</string>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonDelete</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Delete</string>
</property>
</widget>
</hbox>
</widget>
<widget>
<class>QListView</class>
<property stdset="1">
<name>name</name>
<cstring>listView</cstring>
</property>
</widget>
<widget>
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout3</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton3</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Apply</string>
</property>
</widget>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton5</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Validate</string>
</property>
</widget>
<spacer>
<property>
<name>name</name>
<cstring>Spacer1</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget>
<class>QPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton4</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Cancel</string>
</property>
</widget>
</hbox>
</widget>
</vbox>
</widget>
<connections>
<connection>
<sender>buttonAdd</sender>
<signal>clicked()</signal>
<receiver>v3ext_UI</receiver>
<slot>addEntry()</slot>
</connection>
<connection>
<sender>buttonDelete</sender>
<signal>clicked()</signal>
<receiver>v3ext_UI</receiver>
<slot>delEntry()</slot>
</connection>
<connection>
<sender>PushButton4</sender>
<signal>clicked()</signal>
<receiver>v3ext_UI</receiver>
<slot>reject()</slot>
</connection>
<connection>
<sender>PushButton3</sender>
<signal>clicked()</signal>
<receiver>v3ext_UI</receiver>
<slot>apply()</slot>
</connection>
<connection>
<sender>PushButton5</sender>
<signal>clicked()</signal>
<receiver>v3ext_UI</receiver>
<slot>validate()</slot>
</connection>
<slot access="public">addEntry()</slot>
<slot access="public">apply()</slot>
<slot access="public">delEntry()</slot>
<slot access="public">validate()</slot>
</connections>
</UI>
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>v3ext</class>
<widget class="QDialog" name="v3ext" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>316</width>
<height>181</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form1</string>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>8</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QComboBox" name="type" />
</item>
<item>
<widget class="QLineEdit" name="value" />
</item>
<item>
<widget class="QPushButton" name="buttonAdd" >
<property name="text" >
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonDelete" >
<property name="text" >
<string>Delete</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QTreeWidget" name="treeWidget" />
</item>
<item>
<layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item>
<widget class="QPushButton" name="PushButton3" >
<property name="text" >
<string>Apply</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="PushButton5" >
<property name="text" >
<string>Validate</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="PushButton4" >
<property name="text" >
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
<resources/>
<connections/>
</ui>

View File

@ -52,16 +52,16 @@
#include "CertView.h"
#include "widgets/MainWindow.h"
#include <qvalidator.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qcombobox.h>
#include <qradiobutton.h>
#include <qmessagebox.h>
#include <qpopupmenu.h>
#include <qtextview.h>
#include <qpushbutton.h>
#include <qinputdialog.h>
#include <Qt/qvalidator.h>
#include <Qt/qcheckbox.h>
#include <Qt/qlabel.h>
#include <Qt/qcombobox.h>
#include <Qt/qradiobutton.h>
#include <Qt/qmessagebox.h>
#include <Qt/q3popupmenu.h>
#include <Qt/q3textview.h>
#include <Qt/qpushbutton.h>
#include <Qt/qinputdialog.h>
#include "widgets/CertExtend.h"
#include "widgets/ExportCert.h"
#include "widgets/CertDetail.h"
@ -83,7 +83,7 @@
#include <sys/stat.h>
#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<pki_base> container = db->getContainer();
if ( container.isEmpty() ) return;
QList<pki_base> 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;

View File

@ -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);

View File

@ -51,9 +51,9 @@
#include "CrlView.h"
#include <qpopupmenu.h>
#include <qmessagebox.h>
#include <qlineedit.h>
#include <Qt/q3popupmenu.h>
#include <Qt/qmessagebox.h>
#include <Qt/qlineedit.h>
#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;
}

View File

@ -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);
};

View File

@ -58,19 +58,19 @@
#include "widgets/MainWindow.h"
#include "widgets/clicklabel.h"
#include "lib/pki_key.h"
#include <qcombobox.h>
#include <qregexp.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qtextview.h>
#include <qmessagebox.h>
#include <qpopupmenu.h>
#include <qcheckbox.h>
#include <Qt/qcombobox.h>
#include <Qt/qregexp.h>
#include <Qt/qlabel.h>
#include <Qt/qpushbutton.h>
#include <Qt/qlineedit.h>
#include <Qt/q3textview.h>
#include <Qt/qmessagebox.h>
#include <Qt/q3popupmenu.h>
#include <Qt/qcheckbox.h>
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.") );
}

View File

@ -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();

View File

@ -54,14 +54,14 @@
#include "widgets/ReqDetail.h"
#include "widgets/KeyDetail.h"
#include <openssl/evp.h>
#include <qpopupmenu.h>
#include <qmessagebox.h>
#include <qfiledialog.h>
#include <qdir.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qpushbutton.h>
#include <Qt/q3popupmenu.h>
#include <Qt/qmessagebox.h>
#include <Qt/q3filedialog.h>
#include <Qt/qdir.h>
#include <Qt/qlabel.h>
#include <Qt/qlineedit.h>
#include <Qt/qcombobox.h>
#include <Qt/qpushbutton.h>
#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;

View File

@ -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();

View File

@ -53,10 +53,10 @@
#include "TempView.h"
#include "widgets/MainWindow.h"
#include "widgets/NewX509.h"
#include <qmessagebox.h>
#include <qpopupmenu.h>
#include <Qt/qmessagebox.h>
#include <Qt/q3popupmenu.h>
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()));

View File

@ -1,3 +1,7 @@
//Added by the Qt porting tool:
#include <QPixmap>
/* 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 <q3listview.h>
#include <Qt/q3listview.h>
#else
#include <qlistview.h>
#include <Qt/q3listview.h>
#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();

View File

@ -54,22 +54,22 @@
#include "XcaListView.h"
#include "widgets/MainWindow.h"
#include "widgets/ImportMulti.h"
#include <qinputdialog.h>
#include <qfiledialog.h>
#include <qmessagebox.h>
#include <Qt/qinputdialog.h>
#include <Qt/q3filedialog.h>
#include <Qt/qmessagebox.h>
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<pki_base> 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) { }

View File

@ -52,11 +52,7 @@
#ifndef XCALISTVIEW_H
#define XCALISTVIEW_H
#ifdef qt4
#include <q3listview.h>
#else
#include <qlistview.h>
#endif
#include <Qt/qlistview.h>
#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();

View File

@ -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 <qlabel.h>
#include <qtextview.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <Qt/qlabel.h>
//#include <Qt/qtextview.h>
#include <Qt/qpushbutton.h>
#include <Qt/qlineedit.h>
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"));
}

View File

@ -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

View File

@ -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 <qlabel.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qcheckbox.h>
#include <Qt/qlabel.h>
#include <Qt/qlineedit.h>
#include <Qt/qcombobox.h>
#include <Qt/qcheckbox.h>
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);
}

View File

@ -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();

View File

@ -55,12 +55,12 @@
#include "lib/pki_crl.h"
#include "widgets/distname.h"
#include "widgets/clicklabel.h"
#include <qlabel.h>
#include <qtextview.h>
#include <qlistview.h>
#include <qlineedit.h>
#include <Qt/qlabel.h>
#include <Qt/q3textview.h>
#include <Qt/q3listview.h>
#include <Qt/qlineedit.h>
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]);

View File

@ -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

View File

@ -52,9 +52,9 @@
#include "ExportCert.h"
#include "lib/base.h"
#include <qcombobox.h>
#include <qlineedit.h>
#include <qfiledialog.h>
#include <Qt/qcombobox.h>
#include <Qt/qlineedit.h>
#include <Qt/q3filedialog.h>
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())

View File

@ -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 <qfiledialog.h>
#include <qcheckbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <Qt/qfiledialog.h>
#include <Qt/qcheckbox.h>
#include <Qt/qlineedit.h>
#include <Qt/qcombobox.h>
#include <Qt/qfiledialog.h>
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);
}
}

View File

@ -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

View File

@ -51,8 +51,8 @@
#include "ExportTinyCA.h"
#include <qfiledialog.h>
#include <qlineedit.h>
#include <Qt/q3filedialog.h>
#include <Qt/qlineedit.h>
#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();

View File

@ -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 <qpushbutton.h>
#include <qpopupmenu.h>
#include <qmessagebox.h>
#include <qlabel.h>
//#include "widgets/ReqDetail.h"
#include <Qt/qpushbutton.h>
#include <Qt/qmessagebox.h>
#include <Qt/qlabel.h>
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; i<p7->numCert(); 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 */

View File

@ -54,30 +54,28 @@
#include "ui/ImportMulti.h"
#include "lib/pki_base.h"
#include <qlistview.h>
#ifndef qt3
#include <qlist.h>
#endif
#include <Qt/qlist.h>
class pki_x509;
class pki_key;
class ImportMulti: public ImportMulti_UI
class ImportMulti: public QDialog, private Ui::ImportMulti
{
Q_OBJECT
private:
QList<pki_base> 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();

View File

@ -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 <qlabel.h>
#include <qtextview.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <Qt/qlabel.h>
#include <Qt/qpushbutton.h>
#include <Qt/qlineedit.h>
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"));
}

View File

@ -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();

View File

@ -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 <qdir.h>
#include <qstatusbar.h>
#endif
#include <Qt/qdir.h>
#include <Qt/qstatusbar.h>
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);
}

View File

@ -51,11 +51,11 @@
#include "MainWindow.h"
#include <qapplication.h>
#include <qmime.h>
#include <qtextbrowser.h>
#include <qpixmap.h>
#include <qlabel.h>
#include <Qt/qapplication.h>
#include <Qt/qmime.h>
#include <Qt/q3textbrowser.h>
#include <Qt/qpixmap.h>
#include <Qt/qlabel.h>
#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("<p><h3><center><u>XCA</u></center></h3>"
"<p>Copyright 2002 - 2003 by Christian Hohnst&auml;dt - "
"<p>Copyright 2002 - 2006 by Christian Hohnst&auml;dt - "
"version : <b>" VER "</b>"
"<p>%s<br>%s<br>QT: %s"
"<p>%s<br>QT: %s"
"<hr><table border=0>"
"<tr><th align=left>Christian Hohnst&auml;dt</th><td><u>&lt;christian@hohnstaedt.de&gt;</u></td></tr>"
"<tr><td></td><td>Programming, Translation and Testing</td></tr>"
@ -99,21 +103,22 @@ void MainWindow::about()
"<tr><td></td><td>SPKAC support and Testing</td></tr>"
"</table><hr><center><u><b>General support</b></u></center>"
"<p><b>Mark Foster</b> <u>&lt;mark@foster.cc&gt;</u>",
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();
}

View File

@ -52,50 +52,48 @@
#include "MainWindow.h"
#include "lib/load_obj.h"
#include <qapplication.h>
#include <qmenubar.h>
#include <Qt/qapplication.h>
#include <Qt/qmenubar.h>
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();
}

View File

@ -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 <qapplication.h>
#include <qclipboard.h>
#include <qmessagebox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlistview.h>
#include <qlineedit.h>
#include <qtextbrowser.h>
//#include "ImportMulti.h"
#include <Qt/qapplication.h>
#include <Qt/qclipboard.h>
#include <Qt/qmessagebox.h>
#include <Qt/qlabel.h>
#include <Qt/qpushbutton.h>
#include <Qt/qlistview.h>
#include <Qt/qlineedit.h>
#include <Qt/qtextbrowser.h>
#include <Qt/qstatusbar.h>
#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
}

View File

@ -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 <qpixmap.h>
#include <qfiledialog.h>
#include <qmenubar.h>
#include <Qt/qpixmap.h>
#include <Qt/qfiledialog.h>
#include <Qt/qmenubar.h>
#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

View File

@ -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))

View File

@ -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 <qgroupbox.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qradiobutton.h>
#include <qmessagebox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qwhatsthis.h>
#include <qlistbox.h>
#include <qlistview.h>
#include <qpixmap.h>
#include <qpushbutton.h>
#include <qvalidator.h>
#include <qbuttongroup.h>
#include <qtextview.h>
#include <Qt/qcheckbox.h>
#include <Qt/qcombobox.h>
#include <Qt/qradiobutton.h>
#include <Qt/qmessagebox.h>
#include <Qt/qlineedit.h>
#include <Qt/qlabel.h>
#include <Qt/qpixmap.h>
#include <Qt/qpushbutton.h>
#include <Qt/qvalidator.h>
#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; i<reqList->count(); i++) {
if (reqList->text(i) == reqname) {
reqList->setCurrentItem(i);
break;
}
}
#endif
// reqList->setCurrentText(reqname);
}
void NewX509::defineSigner(pki_x509 *defcert)
{
// suggested from: Andrey Brindeew <abr@abr.pp.ru>
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; i<certList->count();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; i<c; i++) {
item = lb->item(i);
if (lb->isItemSelected(item)){
x |= 1<<i;
}
}
@ -341,10 +255,14 @@ int NewX509::lb2int(QListBox *lb)
}
void NewX509::int2lb(QListBox *lb, int x)
void NewX509::int2lb(QListWidget *lb, int x)
{
for (int i=0; lb->item(i); i++) {
lb->setSelected(i, (1<<i) & x);
int i, c=lb->count();
QListWidgetItem *item;
for (i=0; i<c; i++) {
item = lb->item(i);
lb->setItemSelected(item, (1<<i) & x);
}
}
@ -364,8 +282,9 @@ void NewX509::fromTemplate(pki_temp *temp)
nsRenewalUrl->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; i<tempList->count();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; j<EXPLICIT_NAME_CNT; j++) {
x.addEntryByNid(name_nid[j], name_ptr[j]->text());
}
#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);
}

View File

@ -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 <openssl/x509v3.h>
#include <Qt/qlistwidget.h>
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();

View File

@ -51,14 +51,14 @@
#include "NewX509.h"
#include <qgroupbox.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qradiobutton.h>
#include <qlineedit.h>
#include <qwhatsthis.h>
#include <qlistbox.h>
#include <qlistview.h>
//#include <Qt/q3groupbox.h>
#include <Qt/qcheckbox.h>
#include <Qt/qcombobox.h>
#include <Qt/qradiobutton.h>
#include <Qt/qlineedit.h>
//#include <Qt/q3whatsthis.h>
//#include <Qt/q3listbox.h>
#include <Qt/qlistwidget.h>
#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());

View File

@ -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 <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qtextview.h>
#include <Qt/qlabel.h>
#include <Qt/qlineedit.h>
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("<br>"));
v3extensions->document()->setHtml(el.getHtml("<br>"));
}
void ReqDetail::setImport()
{
// rename the buttons in case of import
but_ok->setText(tr("Import"));
but_cancel->setText(tr("Discard"));
}

View File

@ -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 <Qt/qdialog.h>
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

68
widgets/XcaTreeView.cpp Normal file
View File

@ -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 <Qt/qabstractitemmodel.h>
#include <Qt/qevent.h>
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()));
}

65
widgets/XcaTreeView.h Normal file
View File

@ -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 <Qt/qtreeview.h>
class XcaTreeView: public QTreeView
{
Q_OBJECT
public:
XcaTreeView(QWidget *parent = 0);
void contextMenuEvent(QContextMenuEvent * e);
};
#endif

View File

@ -51,20 +51,20 @@
#include "clicklabel.h"
#include <qtooltip.h>
#include <qpalette.h>
#include <qcolor.h>
#include <Qt/qtooltip.h>
#include <Qt/qpalette.h>
#include <Qt/qcolor.h>
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()

View File

@ -52,7 +52,7 @@
#ifndef CLICKLABEL_H
#define CLICKLABEL_H
#include <qlabel.h>
#include <Qt/qlabel.h>
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();

View File

@ -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 <qcombobox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <Qt/qlabel.h>
#include <Qt/qlineedit.h>
#include "lib/x509name.h"
#include <iostream>
#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; i<n.entryCount(); i++) {
printf("X509name %d\n", i);
lb = new QLabel( this );
le = new QLineEdit( this );
sl = n.entryList(i);
lb->setText(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;
};

View File

@ -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 <qwidget.h>
#include <qlayout.h>
#include <Qt/qwidget.h>
#include <Qt/qgridlayout.h>
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

View File

@ -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 <qlabel.h>
#include <qlistbox.h>
#include <qcombobox.h>
#include <qlistview.h>
#include <qlineedit.h>
#include <qstringlist.h>
#include <qmessagebox.h>
#include <Qt/qlabel.h>
#include <Qt/qlistwidget.h>
#include <Qt/qcombobox.h>
#include <Qt/qlineedit.h>
#include <Qt/qstringlist.h>
#include <Qt/qmessagebox.h>
#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()

View File

@ -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 <qlistview.h>
#include <qlineedit.h>
#include <qstringlist.h>
#include <Qt/qlineedit.h>
#include <Qt/qstringlist.h>
#include <openssl/x509v3.h>
#ifndef qt3
#include <qlist.h>
#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);

View File

@ -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 <qcombobox.h>
#include <qlineedit.h>
#include <qvalidator.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qpushbutton.h>
#include <qfontmetrics.h>
#include <qlabel.h>
#include <Qt/qdatetime.h>
#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()

View File

@ -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 <qgroupbox.h>
#include <Qt/qdatetimeedit.h>
#include <lib/asn1time.h>
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

13
xca.pro
View File

@ -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