mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
This is not a good status :-(
This commit is contained in:
parent
471ad830e7
commit
d41a70fa77
@ -52,6 +52,7 @@
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
||||
QPixmap *MainWindow::keyImg = NULL, *MainWindow::csrImg = NULL, *MainWindow::certImg = NULL;
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent, const char *name )
|
||||
@ -77,13 +78,13 @@ MainWindow::MainWindow(QWidget *parent, const char *name )
|
||||
ERR_load_crypto_strings();
|
||||
OpenSSL_add_all_algorithms();
|
||||
settings = new db_base(dbenv, dbfile.latin1(), "settings");
|
||||
keyImg = loadImg("bigkey.png");
|
||||
csrImg = loadImg("bigcsr.png");
|
||||
certImg = loadImg("bigcert.png");
|
||||
initPass();
|
||||
keys = new db_key(dbenv, dbfile.latin1(), keyList);
|
||||
reqs = new db_x509req(dbenv, dbfile.latin1(), reqList, keys);
|
||||
certs = new db_x509(dbenv, dbfile.latin1(), certList, keys);
|
||||
keyImg = loadImg("bigkey.png");
|
||||
csrImg = loadImg("bigcsr.png");
|
||||
certImg = loadImg("bigcert.png");
|
||||
bigKey->setPixmap(*keyImg);
|
||||
bigCsr->setPixmap(*csrImg);
|
||||
bigCert->setPixmap(*certImg);
|
||||
@ -164,6 +165,7 @@ 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);
|
||||
if (p != NULL) {
|
||||
dlg->image->setPixmap( *keyImg );
|
||||
dlg->title->setText(tr(p->title->c_str()));
|
||||
dlg->description->setText(tr(p->description->c_str()));
|
||||
}
|
||||
|
||||
@ -58,6 +58,7 @@
|
||||
#include "NewKey_UI.h"
|
||||
#include "NewX509Req_UI.h"
|
||||
#include "NewX509.h"
|
||||
#include "NewX509_0.h"
|
||||
#include "NewX509_1_UI.h"
|
||||
#include "NewX509_2_UI.h"
|
||||
#include "NewX509_3_UI.h"
|
||||
@ -111,7 +112,7 @@ class MainWindow: public MainWindow_UI
|
||||
db_key *keys;
|
||||
DbEnv *dbenv;
|
||||
db_base *settings;
|
||||
QPixmap *keyImg, *csrImg, *certImg;
|
||||
static QPixmap *keyImg, *csrImg, *certImg;
|
||||
public:
|
||||
QString baseDir, dbfile;
|
||||
static const int sizeList[];
|
||||
|
||||
@ -61,11 +61,12 @@ void MainWindow::newCert()
|
||||
int serial = 42; // :-)
|
||||
int i, retval;
|
||||
NewX509_0 *dlg1 = new NewX509_0(this, NULL, keys, reqs);
|
||||
NewX509_1_UI *dlg2 = new NewX509_1_UI(this, NULL, true ,0);
|
||||
NewX509_2_UI *dlg3 = new NewX509_2_UI(this, NULL, true ,0);
|
||||
NewX509_3_UI *dlg4 = new NewX509_3_UI(this, NULL, true ,0);
|
||||
NewX509_1_UI *dlg2 = new NewX509_1_UI(this, NULL);
|
||||
NewX509_2_UI *dlg3 = new NewX509_2_UI(this, NULL);
|
||||
NewX509_3_UI *dlg4 = new NewX509_3_UI(this, NULL);
|
||||
NewX509 *dlg[4] = {dlg1, dlg2, dlg3, dlg4};
|
||||
|
||||
CERR <<" Everything created" << endl;
|
||||
// preset dlg 2 selection of signer
|
||||
QStringList strlist = certs->getSignerDesc();
|
||||
if (strlist.isEmpty()) {
|
||||
@ -75,12 +76,19 @@ void MainWindow::newCert()
|
||||
else {
|
||||
dlg2->certList->insertStringList(strlist);
|
||||
}
|
||||
CERR <<" Everything created A" << endl;
|
||||
// preset dialogs with images
|
||||
for (i=4;i>0;i--) {
|
||||
dlg[i]->image->setPixmap(*certImg);
|
||||
for (i=0;i<4;i++) {
|
||||
CERR <<" Everything created :" << i << endl;
|
||||
//dlg[i]->image->setPixmap(*certImg);
|
||||
}
|
||||
CERR <<" Everything created V" << endl;
|
||||
i=0;
|
||||
|
||||
if (!dlg1->exec()) return;
|
||||
if (!dlg2->exec()) return;
|
||||
if (!dlg3->exec()) return;
|
||||
if (!dlg4->exec()) return;
|
||||
|
||||
|
||||
|
||||
@ -176,7 +184,7 @@ void MainWindow::newCert()
|
||||
|
||||
// STEP 4
|
||||
// Subject Alternative name
|
||||
string subAlt = dlg4->subAlt->text().latin1();
|
||||
string subAlt = dlg4->subAltURL->text().latin1();
|
||||
//if (subAlt != "") {
|
||||
|
||||
// key usage
|
||||
@ -184,7 +192,7 @@ void MainWindow::newCert()
|
||||
"dataEncipherment", "keyAgreement", "keyCertSign",
|
||||
"cRLSign", "encipherOnly", "decipherOnly"};
|
||||
QListBoxItem *item;
|
||||
int i=0;
|
||||
i=0;
|
||||
string keyuse, keyuse1;
|
||||
while ((item = dlg3->keyUsage->item(i))) {
|
||||
if (item->selected()){
|
||||
|
||||
@ -31,6 +31,7 @@ OBJS=NewKey_UI.o NewKey_UI_MOC.o \
|
||||
NewX509_2_UI.o NewX509_2_UI_MOC.o \
|
||||
NewX509_3_UI.o NewX509_3_UI_MOC.o \
|
||||
NewX509.o NewX509_MOC.o \
|
||||
NewX509_0.o NewX509_0_MOC.o \
|
||||
CertDetail_UI.o CertDetail_UI_MOC.o \
|
||||
Rename_UI.o Rename_UI_MOC.o \
|
||||
ExportKey.o ExportKey_MOC.o \
|
||||
@ -47,7 +48,7 @@ re: clean all
|
||||
MainWindow.h: MainWindow_UI.h KeyDetail_UI.h \
|
||||
PassRead_UI.h PassWrite_UI.h ExportKey_UI.h \
|
||||
NewX509Req_UI.h NewKey_UI.h ReqDetail_UI.h \
|
||||
NewX509_UI.h CertDetail_UI.h NewX509_1_UI.h \
|
||||
NewX509_0_UI.h CertDetail_UI.h NewX509_1_UI.h NewX509.h \
|
||||
NewX509_2_UI.h NewX509_3_UI.h Rename_UI.h TrustState_UI.h
|
||||
|
||||
%.o: %.cpp
|
||||
@ -62,8 +63,9 @@ NewX509_%.mui: NewX509_%.ui
|
||||
%.mui: %.ui
|
||||
cp $< $@
|
||||
|
||||
#NewX509_%_UI.h: NewX509.h NewX509_%.mui
|
||||
# $(UIC) -o $@ $<
|
||||
NewX509_%_UI.h: NewX509_%.mui NewX509.h
|
||||
echo '#include "NewX509.h"' > $@
|
||||
$(UIC) $< >> $@
|
||||
#
|
||||
#NewX509_%_UI.cpp: NewX509_%_UI.h NewX509_%.mui
|
||||
# $(UIC) -o $@ -subimpl NewX509 $^
|
||||
|
||||
@ -49,10 +49,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <NewX509.h>
|
||||
#include "NewX509.h"
|
||||
|
||||
NewX509::NewX509( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 )
|
||||
:QDialog(parent, name, modal, fl)
|
||||
NewX509::NewX509( QWidget* parent = 0, const char* name = 0 )
|
||||
:QDialog(parent, name, true, 0)
|
||||
{
|
||||
image = NULL;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ class NewX509: public QDialog
|
||||
Q_OBJECT
|
||||
public:
|
||||
QLabel * image;
|
||||
NewX509( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
NewX509( QWidget* parent = 0, const char* name = 0 );
|
||||
|
||||
public slots:
|
||||
virtual void goBack();
|
||||
|
||||
@ -52,7 +52,8 @@
|
||||
#include "NewX509_0.h"
|
||||
|
||||
NewX509_0::NewX509_0(QWidget *parent , const char *name, db_key *key, db_x509req *req)
|
||||
:NewX509_0_UI(parent, name, true, 0)
|
||||
:NewX509_0_UI(parent, name)
|
||||
// :NewX509_0_UI(parent, name, true, 0)
|
||||
{
|
||||
connect( this, SIGNAL(genKey()), parent, SLOT(newKey()) );
|
||||
keys = key;
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "NewX509_UI.h"
|
||||
#include "NewX509_0_UI.h"
|
||||
#include <qcombobox.h>
|
||||
#include <qradiobutton.h>
|
||||
#include "lib/db_key.h"
|
||||
@ -70,7 +70,7 @@ class NewX509_0: public NewX509_0_UI
|
||||
db_key *keys;
|
||||
MainWindow *par;
|
||||
public:
|
||||
NewX509(QWidget *parent, const char *name, db_key *key, db_x509req *req);
|
||||
NewX509_0(QWidget *parent, const char *name, db_key *key, db_x509req *req);
|
||||
|
||||
public slots:
|
||||
void setDisabled(int state);
|
||||
|
||||
19
NewX509_0.ui
19
NewX509_0.ui
@ -1,6 +1,5 @@
|
||||
<!DOCTYPE UI><UI>
|
||||
<class>NewX509_0_UI</class>
|
||||
<pixmapfunction>loadImage</pixmapfunction>
|
||||
<widget>
|
||||
<class>QDialog</class>
|
||||
<property stdset="1">
|
||||
@ -12,7 +11,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>742</width>
|
||||
<width>738</width>
|
||||
<height>458</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -104,10 +103,6 @@
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>pixmap</name>
|
||||
<pixmap></pixmap>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>scaledContents</name>
|
||||
<bool>true</bool>
|
||||
@ -547,30 +542,24 @@ For a SSL servercertificate choose the DNS name of the server as "Common name"</
|
||||
<receiver>NewX509_0_UI</receiver>
|
||||
<slot>validateFields()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>genKey</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewX509_0_UI</receiver>
|
||||
<slot>newKey()</slot>
|
||||
</connection>
|
||||
<slot access="public">newKey()</slot>
|
||||
<slot access="public">setDisabled(int)</slot>
|
||||
<slot access="public">validateFields()</slot>
|
||||
</connections>
|
||||
<tabstops>
|
||||
<tabstop>fromDataRB</tabstop>
|
||||
<tabstop>description</tabstop>
|
||||
<tabstop>countryName</tabstop>
|
||||
<tabstop>stateOrProvinceName</tabstop>
|
||||
<tabstop>localityName</tabstop>
|
||||
<tabstop>keyList</tabstop>
|
||||
<tabstop>genKey</tabstop>
|
||||
<tabstop>organisationName</tabstop>
|
||||
<tabstop>organisationalUnitName</tabstop>
|
||||
<tabstop>commonName</tabstop>
|
||||
<tabstop>emailAddress</tabstop>
|
||||
<tabstop>fromReqRB</tabstop>
|
||||
<tabstop>reqList</tabstop>
|
||||
<tabstop>PushButton14</tabstop>
|
||||
<tabstop>PushButton15</tabstop>
|
||||
<tabstop>fromDataRB</tabstop>
|
||||
<tabstop>fromReqRB</tabstop>
|
||||
</tabstops>
|
||||
</UI>
|
||||
|
||||
20
NewX509_1.ui
20
NewX509_1.ui
@ -11,7 +11,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>604</width>
|
||||
<width>600</width>
|
||||
<height>214</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -268,6 +268,12 @@
|
||||
</vbox>
|
||||
</widget>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>PushButton15</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewX509_1_UI</receiver>
|
||||
<slot>reject()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>PushButton14</sender>
|
||||
<signal>clicked()</signal>
|
||||
@ -275,11 +281,19 @@
|
||||
<slot>accept()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>PushButton15</sender>
|
||||
<sender>PushButton14</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewX509_1_UI</receiver>
|
||||
<slot>reject()</slot>
|
||||
<slot>goNext()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>PushButton14_2</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewX509_1_UI</receiver>
|
||||
<slot>goBack()</slot>
|
||||
</connection>
|
||||
<slot access="public">goNext()</slot>
|
||||
<slot access="public">goBack()</slot>
|
||||
</connections>
|
||||
<tabstops>
|
||||
<tabstop>PushButton14</tabstop>
|
||||
|
||||
22
NewX509_2.ui
22
NewX509_2.ui
@ -11,7 +11,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>563</width>
|
||||
<width>559</width>
|
||||
<height>507</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -643,18 +643,26 @@
|
||||
</vbox>
|
||||
</widget>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>PushButton14</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewX509_2_UI</receiver>
|
||||
<slot>accept()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>PushButton15</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewX509_2_UI</receiver>
|
||||
<slot>reject()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>PushButton14</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewX509_2_UI</receiver>
|
||||
<slot>goBack()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>PushButton8</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>NewX509_2_UI</receiver>
|
||||
<slot>goNext()</slot>
|
||||
</connection>
|
||||
<slot access="public">goNext()</slot>
|
||||
<slot access="public">goBack()</slot>
|
||||
</connections>
|
||||
<tabstops>
|
||||
<tabstop>PushButton14</tabstop>
|
||||
|
||||
93
PassRead.ui
93
PassRead.ui
@ -11,7 +11,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>451</width>
|
||||
<width>491</width>
|
||||
<height>184</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -29,23 +29,86 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget>
|
||||
<class>QLabel</class>
|
||||
<class>QLayoutWidget</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>
|
||||
<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>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>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>
|
||||
|
||||
109
PassWrite.ui
109
PassWrite.ui
@ -11,7 +11,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>494</width>
|
||||
<width>490</width>
|
||||
<height>236</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -29,31 +29,94 @@
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget>
|
||||
<class>QLabel</class>
|
||||
<class>QLayoutWidget</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>
|
||||
<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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user