mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Cloud storage: remove outdated certificate hack
The old server certificates where not recognized on some older platform, so we hardcoded the hex digest of the valid certificate and ignored the error. Those certificates have been replaced last week, so there is no point to this hack anymore - also, we should always show the SSL error, not just in verbose mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
65ec16e59d
commit
9c744e401e
1 changed files with 3 additions and 18 deletions
|
@ -78,24 +78,9 @@ bool CheckCloudConnection::checkServer()
|
|||
|
||||
void CheckCloudConnection::sslErrors(const QList<QSslError> &errorList)
|
||||
{
|
||||
if (verbose) {
|
||||
qDebug() << "Received error response trying to set up https connection with cloud storage backend:";
|
||||
for (QSslError err: errorList) {
|
||||
qDebug() << err.errorString();
|
||||
}
|
||||
}
|
||||
QSslConfiguration conf = reply->sslConfiguration();
|
||||
QSslCertificate cert = conf.peerCertificate();
|
||||
QByteArray hexDigest = cert.digest().toHex();
|
||||
if (reply->url().toString().contains(prefs.cloud_base_url) &&
|
||||
hexDigest == "13ff44c62996cfa5cd69d6810675490e") {
|
||||
if (verbose)
|
||||
qDebug() << "Overriding SSL check as I recognize the certificate digest" << hexDigest;
|
||||
reply->ignoreSslErrors();
|
||||
} else {
|
||||
if (verbose)
|
||||
qDebug() << "got invalid SSL certificate with hex digest" << hexDigest;
|
||||
}
|
||||
qDebug() << "Received error response trying to set up https connection with cloud storage backend:";
|
||||
for (QSslError err: errorList)
|
||||
qDebug() << err.errorString();
|
||||
}
|
||||
|
||||
// helper to be used from C code
|
||||
|
|
Loading…
Reference in a new issue