GH-960 possible fix for missing OSX ca certs

This commit is contained in:
Petr Mrázek
2015-05-19 22:28:51 +02:00
parent 2ad9e6393f
commit d0b31da4b5
6 changed files with 42 additions and 0 deletions

View File

@ -236,6 +236,8 @@ MultiMC::MultiMC(int &argc, char **argv, bool test_mode) : QApplication(argc, ar
ENV.updateProxySettings(proxyTypeStr, addr, port, user, pass);
}
initSSL();
m_translationChecker->downloadTranslations();
//FIXME: what to do with these?
@ -271,6 +273,17 @@ MultiMC::~MultiMC()
}
}
void MultiMC::initSSL()
{
#ifdef Q_OS_MAC
Q_INIT_RESOURCE(certs);
QFile equifaxFile(":/certs/Equifax_Secure_Certificate_Authority.pem");
equifaxFile.open(QIODevice::ReadOnly);
QSslCertificate equifaxCert(equifaxFile.readAll(), QSsl::Pem);
QSslSocket::addDefaultCaCertificate(equifaxCert);
#endif
}
void MultiMC::initTranslations()
{
QLocale locale(m_settings->get("Language").toString());