diff ui/createcertlistdialog.h @ 454:efd1bd85112f

Save selected certificate in settings and parse it.
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 23 Apr 2014 10:36:22 +0000
parents 17e1c8f37d72
children 88dfe16a0bb9
line wrap: on
line diff
--- a/ui/createcertlistdialog.h	Wed Apr 23 10:34:56 2014 +0000
+++ b/ui/createcertlistdialog.h	Wed Apr 23 10:36:22 2014 +0000
@@ -11,12 +11,15 @@
 #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
 {
@@ -25,18 +28,35 @@
     /** @brief Create a dialog showing settings for the create certificate list
      * process
      * */
-    CreateCertListDialog(QMainWindow *parent);
+    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/