view ui/createcertlistdialog.h @ 464:2e100d3e414a

Add helper functions for sha256 sum and rsa signing
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 23 Apr 2014 15:33:42 +0000
parents efd1bd85112f
children 88dfe16a0bb9
line wrap: on
line source
/* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
 * Software engineering by Intevation GmbH
 *
 * This file is Free Software under the GNU GPL (v>=2)
 * and comes with ABSOLUTELY NO WARRANTY!
 * See LICENSE.txt for details.
 */
#ifndef CREATECERTLISTDIALOG_H
#define CREATECERTLISTDIALOG_H

#include <QDialog>
#include <QMainWindow>
#include <QLineEdit>

#include <polarssl/pk.h>
/**
 * @file createinstallerdialog.h
 * @brief The dialog to show settings and create an installer.
 */

class QListWidget;
class AdministratorWindow;

class CreateCertListDialog : public QDialog
{
    Q_OBJECT
public:
    /** @brief Create a dialog showing settings for the create certificate list
     * process
     * */
    CreateCertListDialog(AdministratorWindow *parent);

private:
    void setupGUI();

    QLineEdit *mCertFile;
    QLineEdit *mSaveFile;
    AdministratorWindow *mAdminWindow;

    pk_context *mPk;

private slots:
    /** @brief Open the certificate selection dialog and parse the certificate
     *
     * If the certificate can be parsed mPk is replaced by the new key
     * otherwise an error message is shown to the user.
     */
    void openCertificateSelect();
    void openSaveLocation();
    /** @brief create a valid certificate list file
     *
     * The contents of the certificate list is the certificatelist
     * of the adminWindow. It is signed with the currently
     * loaded certificate in mPk. On errors the user is
     * informed with showErrorMessage */
    void createList();

    /** @brief show an error message with QMessageBox */
    void showErrorMessage(const QString&msg);
};

#endif // CREATECERTLISTDIALOG_H

http://wald.intevation.org/projects/trustbridge/