/* vi: set sw=4 ts=4: * * Copyright (C) 2001 - 2015 Christian Hohnstaedt. * * All rights reserved. */ #include "MainWindow.h" #include #include #include #include #ifndef OPENSSL_NO_EC #include #endif #include "ui_About.h" #include "ui_Help.h" #include "lib/func.h" #include "lib/entropy.h" void MainWindow::cmd_version() { fprintf(stderr, XCA_TITLE " Version " PACKAGE_VERSION "\n"); exitApp = 1; } void MainWindow::cmd_help(const char* msg) { exitApp = 1; fprintf(stderr, XCA_TITLE " Version " PACKAGE_VERSION "\n" "\n" " -v show version information and exit\n" " -h shows this help screen and exit\n" " -e : extract entry.\n" " -d expect the following argument to be the database name to use\n" " -x Exit after processing all commandline options\n\n"); if(msg) { fprintf(stderr, "Cmdline Error: %s\n", msg); } } void MainWindow::about() { Ui::About ui; QDialog *about = new QDialog(this, 0); QString openssl, qt, cont, version, brainpool; #ifndef OPENSSL_NO_EC #ifdef NID_brainpoolP160r1 EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_brainpoolP160r1); ign_openssl_error(); if (group) { EC_GROUP_free(group); brainpool = "

ECC With RFC 5639 Brainpool curves" #if OPENSSL_VERSION_NUMBER < 0x10002001L "
(Backported to " OPENSSL_VERSION_TEXT ")" #endif ; } #endif #else brainpool = "(Elliptic Curve Cryptography support disabled)"; #endif openssl = SSLeay_version(SSLEAY_VERSION); qt = qVersion(); if (openssl != OPENSSL_VERSION_TEXT || qt != QT_VERSION_STR) { version = QString("" "" "" "" "" "" "" "" "
Compile time:"OPENSSL_VERSION_TEXT"QT version: "QT_VERSION_STR"
Run time:%1QT version: %2
").arg(openssl).arg(qt); } else { version = QString("%1
QT version: %2").arg(openssl).arg(qt); } ui.setupUi(about); Entropy::seed_rng(); cont = QString( "

XCA

" "

Copyright 2001 - 2015 by Christian Hohnstädt\n" "

Version: " PACKAGE_VERSION "" "

%1

%2" "

http://sourceforge.net/projects/xca" "

Entropy strength: %3" "


" "" "" "" "" "
Christian Hohnstädt<christian@hohnstaedt.de>
Programming, Translation and Testing
Kerstin Steinhauff<tine@kerstine.de>
Arts and Graphics

General support
" "

" "" "" "" "" "" "
Mark Foster<mark@foster.cc>
Thorsten Weiss<weiss2@gmx.de>
Oobj<www.oobj.com.br>
Frank Isemann<isemannf@firflabs.net>
Helmut Strobl<helmut.strobl@t-online.de>


Maintained Translations
" "

" "" "" "" "
GermanChristian Hohnstädt <christian@hohnstaedt.de>
FrenchPatrick Monnerat <Patrick.Monnerat@datasphere.ch>
CroatianNevenko Bartolincic <nevenko.bartolincic@gmail.com>
").arg(brainpool).arg(version).arg(Entropy::strength()); about->setWindowTitle(XCA_TITLE); ui.image->setPixmap( *keyImg ); ui.image1->setPixmap( *certImg ); ui.textbox->setHtml(cont); about->exec(); delete about; } void MainWindow::help() { QDialog *h = new QDialog(this, 0); QString path, uri; Ui::Help ui; ui.setupUi(h); path = QString("file://"); #ifdef WIN32 path += "/"; #endif path += getDocDir() + "/"; #ifdef WIN32 path = path.replace("\\","/"); #endif uri = path + "xca.html"; ui.textbox->setSource(QUrl(uri)); ui.textbox->setSearchPaths(QStringList(path)); h->setWindowTitle(tr(XCA_TITLE)); h->show(); }