Removed unused SSL download code #4546

This commit is contained in:
Nick Bolton 2015-04-20 16:31:36 +01:00
parent a649a0e3df
commit 97060d9698
2 changed files with 0 additions and 59 deletions

View File

@ -44,7 +44,6 @@ static QString kUnixOpenSslCommand = "openssl";
#if defined(Q_OS_WIN)
static const char kWinPluginExt[] = ".dll";
static const char kWinOpenSslSetup[] = "openssl-1.0.2-Windows-x86.exe";
static const char kWinOpenSslBinary[] = "OpenSSL\\openssl.exe";
#elif defined(Q_OS_MAC)
@ -120,48 +119,6 @@ void PluginManager::downloadPlugins()
}
}
void PluginManager::saveOpenSslSetup()
{
QDir dir(m_ProfileDir);
if (!dir.exists()) {
dir.mkpath(".");
}
#if defined(Q_OS_WIN)
QString filename =
QString("%1\\%2")
.arg(m_ProfileDir)
.arg(kWinOpenSslSetup);
QFile file(filename);
if (!file.open(QIODevice::WriteOnly)) {
emit error(
tr("Failed to save certificate tool to: %1")
.arg(m_ProfileDir));
return;
}
file.write(m_DataDownloader.data());
file.close();
QStringList installArgs;
installArgs.append("-s");
installArgs.append("-y");
if (!runProgram(filename, installArgs, QStringList())) {
return;
}
// openssl installer no longer needed
QFile::remove(filename);
emit info(tr("SSL tools ready"));
#endif
emit openSslBinaryReady();
}
void PluginManager::generateCertificate()
{
QString openSslProgramFile;
@ -330,19 +287,6 @@ QString PluginManager::getPluginUrl(const QString& pluginName)
return result;
}
QString PluginManager::getOpenSslSetupUrl()
{
QString result;
#if defined(Q_OS_WIN)
result = kBaseUrl;
result.append("/tools/");
result.append(kWinOpenSslSetup);
#endif
return result;
}
bool PluginManager::checkOpenSslBinary()
{
// assume OpenSsl is unavailable on Windows,

View File

@ -39,15 +39,12 @@ public:
public slots:
void downloadPlugins();
void saveOpenSslSetup();
void generateCertificate();
private:
void savePlugin();
QString getPluginUrl(const QString& pluginName);
QString getOpenSslSetupUrl();
bool checkOpenSslBinary();
void downloadOpenSslSetup();
bool runProgram(
const QString& program,
const QStringList& args,