Removed unused SSL download code #4546
This commit is contained in:
parent
a649a0e3df
commit
97060d9698
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue