From d57963e43a8b1d02b908fb05136399e8457a5d35 Mon Sep 17 00:00:00 2001 From: me_desk Date: Fri, 13 Sep 2013 19:41:54 +0000 Subject: 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 --- pica-client/main.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pica-client/main.cpp') 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 #include #include +#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; } -- cgit v1.2.1