From 18b87996eb1b125c9c058235ff8b4084681f9646 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Wed, 23 Feb 2022 14:48:40 -0400 Subject: [PATCH] fix: add system certificates --- vendor/DOtherSide/lib/src/DOtherSide.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vendor/DOtherSide/lib/src/DOtherSide.cpp b/vendor/DOtherSide/lib/src/DOtherSide.cpp index 6f5fe97f98..970b9976d6 100644 --- a/vendor/DOtherSide/lib/src/DOtherSide.cpp +++ b/vendor/DOtherSide/lib/src/DOtherSide.cpp @@ -122,6 +122,13 @@ void dos_add_self_signed_certificate(const char* pemCertificateContent) { for (const QSslCertificate &cert : certs) { certList += cert; } + // According to the docs, caCertificates() should have returned + // the system certificates (https://doc.qt.io/archives/qt-5.14/qsslconfiguration.html#systemCaCertificates) + // but looks like there's a bug in QT, because caCertificates() + // returns an empty list. Without this, we end up not being + // able to load stickers or gifs + certList.append(defaultConfig.systemCaCertificates()); + defaultConfig.setCaCertificates(certList); QSslConfiguration::setDefaultConfiguration(defaultConfig); }