|
@@ -1,12 +1,11 @@
|
|
#include "config.h"
|
|
#include "config.h"
|
|
-#include <QDebug>
|
|
|
|
|
|
|
|
namespace Config {
|
|
namespace Config {
|
|
std::map<std::string, std::string> configuration;
|
|
std::map<std::string, std::string> configuration;
|
|
bool configValid = false;
|
|
bool configValid = false;
|
|
bool configInitialized = false;
|
|
bool configInitialized = false;
|
|
std::string configPath = "configGUI.txt";
|
|
std::string configPath = "configGUI.txt";
|
|
-std::vector<std::string> configKeys = {"Autofill-IP", "Default-IP", "Autofill-Username", "Default-Username", "CLI-Path", "Keyfile-Path"};
|
|
|
|
|
|
+std::vector<std::string> configKeys = {"Autofill-IP", "Default-IP", "Autofill-Username", "Default-Username", "CLI-Path", "Keyfile-Path", "Use-SSL", "SSL-Path"};
|
|
} // namespace Config
|
|
} // namespace Config
|
|
|
|
|
|
void Config::setupDefaultConfig() {
|
|
void Config::setupDefaultConfig() {
|
|
@@ -17,6 +16,7 @@ void Config::setupDefaultConfig() {
|
|
setValue(configKeys[1], "0.0.0.0");
|
|
setValue(configKeys[1], "0.0.0.0");
|
|
setValue(configKeys[2], "0");
|
|
setValue(configKeys[2], "0");
|
|
setValue(configKeys[3], "user");
|
|
setValue(configKeys[3], "user");
|
|
|
|
+ setValue(configKeys[6], "0");
|
|
configInitialized = true;
|
|
configInitialized = true;
|
|
configValid = true;
|
|
configValid = true;
|
|
}
|
|
}
|
|
@@ -33,6 +33,10 @@ bool Config::checkConfig() {
|
|
if (autofill_user != "0" && autofill_user != "1")
|
|
if (autofill_user != "0" && autofill_user != "1")
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
|
+ std::string use_ssl = getValue("Use-SSL");
|
|
|
|
+ if (use_ssl != "0" && use_ssl != "1")
|
|
|
|
+ return false;
|
|
|
|
+
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|