mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 03:45:56 +01:00
Add ValiCert's root CA to QSslSocket's list to fix an "invalid username/password" error when connecting to Grooveshark on a Windows machine that didn't have all the root CAs installed.
Fixes issue 2532
(cherry picked from commit 6ab38e0093
)
This commit is contained in:
parent
21441acc94
commit
118985996f
@ -336,5 +336,6 @@
|
||||
<file>icons/32x32/search.png</file>
|
||||
<file>schema/schema-35.sql</file>
|
||||
<file>schema/schema-36.sql</file>
|
||||
<file>grooveshark-valicert-ca.pem</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
19
data/grooveshark-valicert-ca.pem
Normal file
19
data/grooveshark-valicert-ca.pem
Normal file
@ -0,0 +1,19 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
|
||||
IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
|
||||
BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
|
||||
aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
|
||||
9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
|
||||
NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
|
||||
azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
|
||||
YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
|
||||
Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
|
||||
cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
|
||||
dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
|
||||
WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
|
||||
v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
|
||||
UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
|
||||
IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
|
||||
W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
|
||||
-----END CERTIFICATE-----
|
||||
|
10
src/main.cpp
10
src/main.cpp
@ -65,6 +65,7 @@
|
||||
#include <QLibraryInfo>
|
||||
#include <QNetworkCookie>
|
||||
#include <QNetworkProxyFactory>
|
||||
#include <QSslSocket>
|
||||
#include <QSqlDatabase>
|
||||
#include <QSqlQuery>
|
||||
#include <QTextCodec>
|
||||
@ -340,6 +341,15 @@ int main(int argc, char *argv[]) {
|
||||
Q_INIT_RESOURCE(data);
|
||||
Q_INIT_RESOURCE(translations);
|
||||
|
||||
// Grooveshark uses GoDaddy to sign its SSL certificates, which are in turn
|
||||
// signed by a ValiCert CA. This CA certificate isn't installed by default
|
||||
// in Windows, it's only added by windows update, or manually browsing to a
|
||||
// website with a certificate signed by ValiCert. Here we explicitly add
|
||||
// that CA to the default list used by QSslSocket, so it always works in
|
||||
// Clementine.
|
||||
QSslSocket::addDefaultCaCertificates(
|
||||
QSslCertificate::fromPath(":/grooveshark-valicert-ca.pem", QSsl::Pem));
|
||||
|
||||
// Has the user forced a different language?
|
||||
QString language = options.language();
|
||||
if (language.isEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user