summaryrefslogtreecommitdiffstats
path: root/pica-client/main.cpp
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-09-13 19:41:54 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-09-13 19:41:54 +0000
commitd57963e43a8b1d02b908fb05136399e8457a5d35 (patch)
tree1029833f24ee8f39b58ce6bdbf78b3fa2ac3046c /pica-client/main.cpp
parent5946b4f72bc2f8c70e3ee711b050c0e97287f193 (diff)
downloadpica-pica-d57963e43a8b1d02b908fb05136399e8457a5d35.tar.gz
pica-pica-d57963e43a8b1d02b908fb05136399e8457a5d35.zip
switched to TLS 1.2 and DHE-RSA-CAMELLIA256-SHA. DH parameters file is created on first start
git-svn-id: svn://localhost/project_picapica/trunk@273 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/main.cpp')
-rw-r--r--pica-client/main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/pica-client/main.cpp b/pica-client/main.cpp
index 55dc10c..2cfa2d4 100644
--- a/pica-client/main.cpp
+++ b/pica-client/main.cpp
@@ -11,6 +11,7 @@
#include <QMessageBox>
#include <QString>
#include <QIcon>
+#include "openssltool.h"
//globals
QString config_dir;
@@ -239,6 +240,20 @@ static bool create_config_dir()
else
update_database();
+ if (!QFile::exists(config_dir + QDir::separator() + PICA_CLIENT_DHPARAMFILE))
+ {
+ OpenSSLTool osslt;
+ msgBox.setText(QString(QObject::tr("Diffie-Hellman parameters will be generated. Please wait. This process can take several minutes...")));
+ msgBox.exec();
+
+ if (!osslt.GenDHParam(4096, config_dir + QDir::separator() + PICA_CLIENT_DHPARAMFILE))
+ {
+ msgBox.setText(QString(QObject::tr("Failed to generate Diffie-Hellman parameters")));
+ msgBox.exec();
+ return false;
+ }
+ }
+
return true;
}