summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-19 22:28:51 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-19 22:28:51 +0200
commitd0b31da4b53e6aa4630dec9eef9435246889d6c4 (patch)
tree5f003e15ab7515b7359ac1bf7ada001d45268ccd
parent2ad9e6393f1e4aaa31a4bba3639f12e2761cfd53 (diff)
downloadMultiMC-d0b31da4b53e6aa4630dec9eef9435246889d6c4.tar
MultiMC-d0b31da4b53e6aa4630dec9eef9435246889d6c4.tar.gz
MultiMC-d0b31da4b53e6aa4630dec9eef9435246889d6c4.tar.lz
MultiMC-d0b31da4b53e6aa4630dec9eef9435246889d6c4.tar.xz
MultiMC-d0b31da4b53e6aa4630dec9eef9435246889d6c4.zip
GH-960 possible fix for missing OSX ca certs
-rw-r--r--.gitattributes1
-rw-r--r--application/CMakeLists.txt1
-rw-r--r--application/MultiMC.cpp13
-rw-r--r--application/MultiMC.h1
-rw-r--r--application/resources/certs/Equifax_Secure_Certificate_Authority.pem19
-rw-r--r--application/resources/certs/certs.qrc7
6 files changed, 42 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..2a31189d
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.pem -crlf
diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt
index b179927f..b35eabea 100644
--- a/application/CMakeLists.txt
+++ b/application/CMakeLists.txt
@@ -313,6 +313,7 @@ set(MULTIMC_QRCS
resources/iOS/iOS.qrc
resources/instances/instances.qrc
resources/versions/versions.qrc
+ resources/certs/certs.qrc
)
######## Windows resource files ########
diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp
index aae8d154..122890d1 100644
--- a/application/MultiMC.cpp
+++ b/application/MultiMC.cpp
@@ -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());
diff --git a/application/MultiMC.h b/application/MultiMC.h
index b78bbbd2..8215e4ad 100644
--- a/application/MultiMC.h
+++ b/application/MultiMC.h
@@ -152,6 +152,7 @@ private:
void initGlobalSettings(bool test_mode);
void initTranslations();
+ void initSSL();
private:
friend class UpdateCheckerTest;
diff --git a/application/resources/certs/Equifax_Secure_Certificate_Authority.pem b/application/resources/certs/Equifax_Secure_Certificate_Authority.pem
new file mode 100644
index 00000000..b5dd02fc
--- /dev/null
+++ b/application/resources/certs/Equifax_Secure_Certificate_Authority.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
+UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
+dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
+MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
+dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
+BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
+cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
+AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
+MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
+aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
+ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
+IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
+MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
+A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
+7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
+1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
+-----END CERTIFICATE----- \ No newline at end of file
diff --git a/application/resources/certs/certs.qrc b/application/resources/certs/certs.qrc
new file mode 100644
index 00000000..32739c33
--- /dev/null
+++ b/application/resources/certs/certs.qrc
@@ -0,0 +1,7 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/certs">
+ <file>Equifax_Secure_Certificate_Authority.pem</file>
+ </qresource>
+</RCC>
+