diff --git a/changelog b/changelog index ba259fad..b5d8f2e5 100644 --- a/changelog +++ b/changelog @@ -1,8 +1,17 @@ + * correct and fixate the order of x509name entries + * Add CRL properties dialog to select the dates and the + signing algo + * Add SHA256 and SHA512 + * Certificate export for apache and OpenSSH+X509 + * Default templates for client, server, CA removed + * template duplication added * sort serial numbers numerically and not lexicographically + Bug [1166075] * add build support for cygwin and mingw-cross * delete rpm/ and debian/ subdirs * Port to QT4 and openssl 0.9.8 remove the need of Berkeley DB + importing of old database dump possible * finish support for Mac OS X * add X509 V3 extensions to PKCS#10 requests * add "validation" function for editable extensions below diff --git a/lib/db_x509.cpp b/lib/db_x509.cpp index 88ee4542..a1f3e697 100644 --- a/lib/db_x509.cpp +++ b/lib/db_x509.cpp @@ -674,7 +674,7 @@ void db_x509::store() QString fn = mainwin->getPath() + QDir::separator() + crt->getUnderlinedName() + ".crt"; ExportCert *dlg = new ExportCert(mainwin, fn, - (privkey && privkey->isPrivKey()), crt->tinyCAfname() ); + (privkey && privkey->isPrivKey()) ); dlg->image->setPixmap(*MainWindow::certImg); int dlgret = dlg->exec(); diff --git a/lib/pki_x509.cpp b/lib/pki_x509.cpp index 91d1fb15..12802570 100644 --- a/lib/pki_x509.cpp +++ b/lib/pki_x509.cpp @@ -612,37 +612,6 @@ void pki_x509::setCrlExpiry(const a1time &time) openssl_error(); } -QString pki_x509::tinyCAfname() -{ - QString col; - const char *s; - x509name x = getSubject(); - col = x.getEntryByNid(NID_commonName) - +(x.getEntryByNid(NID_commonName) == "" ? " :" : ":") - + x.getEntryByNid(NID_pkcs9_emailAddress) - +(x.getEntryByNid(NID_pkcs9_emailAddress) == "" ? " :" : ":") - + x.getEntryByNid(NID_organizationalUnitName) - +(x.getEntryByNid(NID_organizationalUnitName) == "" ? " :" : ":") - + x.getEntryByNid(NID_organizationName) - +(x.getEntryByNid(NID_organizationName) == "" ? " :" : ":") - + x.getEntryByNid(NID_localityName) - +(x.getEntryByNid(NID_localityName) == "" ? " :" : ":") - + x.getEntryByNid(NID_stateOrProvinceName) - +(x.getEntryByNid(NID_stateOrProvinceName) == "" ? " :" : ":") - + x.getEntryByNid(NID_countryName) - +(x.getEntryByNid(NID_countryName) == "" ? " :" : ":"); - - int len = col.length(); - s = col.toAscii(); - unsigned char *buf = (unsigned char *)OPENSSL_malloc(len * 2 + 3); - - EVP_EncodeBlock(buf, (const unsigned char *)s, len ); - col = (char *)buf; - OPENSSL_free(buf); - col += ".pem"; - return col; -} - x509rev pki_x509::getRev() { x509rev a; diff --git a/lib/pki_x509.h b/lib/pki_x509.h index 1d6484df..06b3341b 100644 --- a/lib/pki_x509.h +++ b/lib/pki_x509.h @@ -136,7 +136,6 @@ class pki_x509 : public pki_x509super int resetTimes(pki_x509 *signer); bool hasExtension(int nid); bool cmpIssuerAndSerial(pki_x509 *refcert); - QString tinyCAfname(); void updateView(); x509rev getRev(); QString getSigAlg(); diff --git a/misc/xca.nsi b/misc/xca.nsi index e0e1dad4..7995eb10 100755 --- a/misc/xca.nsi +++ b/misc/xca.nsi @@ -66,7 +66,7 @@ Section "xca (required)" SecMain File "misc\aia.txt" File /nonfatal "lang\*.qm" File "doc\*.html" - File "${BDIR}/mingwm10.dll" + File "${BDIR}\mingwm10.dll" File "${OPENSSL}\libeay32.dll" File "${QTDIR}\bin\QtGui4.dll" @@ -111,6 +111,24 @@ Section "Update" SecUpdate done2: SectionEnd +;---------------------------------------- +Section "File association" SecFiles + ReadRegStr $1 HKCR ".xdb" "" + StrCmp $1 "" NoBackup + StrCmp $1 "OptionsFile" NoBackup + WriteRegStr HKCR ".xdb" "backup_val" $1 +NoBackup: + WriteRegStr HKCR ".xdb" "" "xca_db" + ReadRegStr $0 HKCR "xca_db" "" + StrCmp $0 "" 0 Skip + WriteRegStr HKCR "xca_db" "" "XCA database" + WriteRegStr HKCR "xca_db\shell" "" "open" + WriteRegStr HKCR "xca_db\DefaultIcon" "" "$INSTDIR\xca.exe,0" +Skip: + WriteRegStr HKCR "xca_db\shell\open\command" "" \ + '$INSTDIR\xca.exe -d "%1"' +; System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)' +SectionEnd ; uninstall stuff ;---------------------------------------- @@ -135,14 +153,26 @@ Section "Uninstall" IfErrors Win9x UserInfo::GetAccountType Pop $0 - StrCmp $0 "Admin" 0 +3 + StrCmp $0 "Admin" 0 Win9x SetShellVarContext all Goto done - SetShellVarContext current Win9x: SetShellVarContext current done: + ReadRegStr $1 HKCR ".xdb" "" + StrCmp $1 "xca_db" 0 Skip + ReadRegStr $1 HKCR ".xdb" "backup_val" + StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key + DeleteRegKey HKCR ".xdb" + Goto Skip +Restore: + WriteRegStr HKCR ".xdb" "" $1 + DeleteRegValue HKCR ".xdb" "backup_val" + DeleteRegKey HKCR "xca_db" ;Delete key with association settings + +; System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)' +Skip: ; remove shortcuts, if any. Delete "$SMPROGRAMS\xca\*.*" @@ -164,11 +194,14 @@ SectionEnd "Exportiert eine alte Datenbank < 0.5.1 in ein ASCII format, das mit dieser Version von XCA importiert werden kann." LangString DESC_SecUpdate ${LANG_ENGLISH} \ "Dumps an old database < 0.5.1 into an ASCII format, that can be imported by the current Version of XCA." + LangString DESC_SecFiles ${LANG_ENGLISH} "File association for *.xdb" + LangString DESC_SecFiles ${LANG_GERMAN} "Registrierung der Dateiendung *.xdb." ;Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SecMain} $(DESC_SecMain) !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcut} $(DESC_SecShortcut) !insertmacro MUI_DESCRIPTION_TEXT ${SecUpdate} $(DESC_SecUpdate) + !insertmacro MUI_DESCRIPTION_TEXT ${SecFiles} $(DESC_SecFiles) !insertmacro MUI_FUNCTION_DESCRIPTION_END LangString DESC_Donation ${LANG_ENGLISH} \ diff --git a/ui/ExportCert.ui b/ui/ExportCert.ui index d043dfd2..67d1e0b2 100644 --- a/ui/ExportCert.ui +++ b/ui/ExportCert.ui @@ -161,24 +161,6 @@ - - - - - 1 - 0 - 0 - 0 - - - - Set the filename to the one used by TinyCA - - - TinyCA filename - - - @@ -354,7 +336,6 @@ exportFormat PushButton7 PushButton9 - tinyCaName diff --git a/ui/MainWindow.ui b/ui/MainWindow.ui index 47146aa4..fa76af43 100644 --- a/ui/MainWindow.ui +++ b/ui/MainWindow.ui @@ -23,7 +23,7 @@ - 2 + 0 diff --git a/widgets/ExportCert.cpp b/widgets/ExportCert.cpp index db3da266..b91729fb 100644 --- a/widgets/ExportCert.cpp +++ b/widgets/ExportCert.cpp @@ -54,8 +54,7 @@ #include #include -ExportCert::ExportCert(QWidget *parent, QString fname, bool hasKey, - const QString tcafn) +ExportCert::ExportCert(QWidget *parent, QString fname, bool hasKey) :QDialog(parent) { setupUi(this); @@ -72,7 +71,6 @@ ExportCert::ExportCert(QWidget *parent, QString fname, bool hasKey, "PEM Cert + key" << "PEM Cert + PKCS8 key"; } exportFormat->addItems(sl); - tinyCAfname = tcafn; } void ExportCert::on_fileBut_clicked() @@ -97,8 +95,3 @@ void ExportCert::on_exportFormat_activated(int) filename->setText(nfn); } -void ExportCert::on_tinyCaName_clicked() -{ - filename->setText(tinyCAfname); -} - diff --git a/widgets/ExportCert.h b/widgets/ExportCert.h index 10b92f2d..0b20e29a 100644 --- a/widgets/ExportCert.h +++ b/widgets/ExportCert.h @@ -59,13 +59,11 @@ class ExportCert: public QDialog, public Ui::ExportCert QString tinyCAfname; public: - ExportCert(QWidget *parent, QString fname, bool hasKey, - const QString tcafn); + ExportCert(QWidget *parent, QString fname, bool hasKey); public slots: void on_fileBut_clicked(); void on_exportFormat_activated(int); - void on_tinyCaName_clicked(); }; #endif diff --git a/widgets/MW_help.cpp b/widgets/MW_help.cpp index d2603c2f..3b13642f 100644 --- a/widgets/MW_help.cpp +++ b/widgets/MW_help.cpp @@ -88,7 +88,6 @@ void MainWindow::about() "

Copyright 2002 - 2006 by Christian Hohnstädt\n" "

Version : " VER "" "

%s
QT: %s" - "

Donations are welcome on my PayPal account: <christian@hohnstaedt.de>" "


" "" "" @@ -109,6 +108,33 @@ void MainWindow::about() about->exec(); } +void MainWindow::donations() +{ + Ui::About ui; + QDialog *d = new QDialog(this, 0); + + ui.setupUi(d); + + QString cont; + cont.sprintf("

XCA

" + "

This program is free software." + "

It doesn't bother you with Pop-Ups, Countdown-Timers, " + "commercials or any type of 'Register Now' buttons. " + "Nor are there any constraints or any limited functionality." + "

Everybody who wants to support my work at XCA may use " + "my PayPal account: <christian@hohnstaedt.de> " + "for a donation." + "

Every donator will in return be honored in the about dialog " + "of the next version." + ); + + d->setWindowTitle(tr(XCA_TITLE)); + ui.image->setPixmap( *keyImg ); + ui.image1->setPixmap( *certImg ); + ui.textbox->setHtml(cont); + d->exec(); +} + void MainWindow::help() { QDialog *h = new QDialog(this, 0); diff --git a/widgets/MW_menu.cpp b/widgets/MW_menu.cpp index 32eea86b..d084cd80 100644 --- a/widgets/MW_menu.cpp +++ b/widgets/MW_menu.cpp @@ -92,6 +92,7 @@ void MainWindow::init_menu() help = menuBar()->addMenu(tr("&Help") ); help->addAction(tr("&Content"), this, SLOT(help()), Qt::Key_F1 ); help->addAction(tr("&About"), this, SLOT(about()) ); + help->addAction(tr("Donations"), this, SLOT(donations()) ); wdList += import; } diff --git a/widgets/MainWindow.h b/widgets/MainWindow.h index 3642762c..9e466467 100644 --- a/widgets/MainWindow.h +++ b/widgets/MainWindow.h @@ -124,6 +124,7 @@ class MainWindow: public QMainWindow, public Ui::MainWindow void dump_database(); void connNewX509(NewX509 *nx); void about(); + void donations(); void help(); void import_dbdump();

Christian Hohnstädt<christian@hohnstaedt.de>
Programming, Translation and Testing