diff --git a/src/base/http/server.cpp b/src/base/http/server.cpp index 50a7c1407..04d7aff62 100644 --- a/src/base/http/server.cpp +++ b/src/base/http/server.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -51,7 +52,7 @@ namespace QList safeCipherList() { const QStringList badCiphers {"idea", "rc4"}; - const QList allCiphers {QSslSocket::supportedCiphers()}; + const QList allCiphers {QSslConfiguration::supportedCiphers()}; QList safeCiphers; std::copy_if(allCiphers.cbegin(), allCiphers.cend(), std::back_inserter(safeCiphers), [&badCiphers](const QSslCipher &cipher) { @@ -72,7 +73,10 @@ Server::Server(IRequestHandler *requestHandler, QObject *parent) , m_https(false) { setProxy(QNetworkProxy::NoProxy); - QSslSocket::setDefaultCiphers(safeCipherList()); + + QSslConfiguration sslConf {QSslConfiguration::defaultConfiguration()}; + sslConf.setCiphers(safeCipherList()); + QSslConfiguration::setDefaultConfiguration(sslConf); auto *dropConnectionTimer = new QTimer(this); connect(dropConnectionTimer, &QTimer::timeout, this, &Server::dropTimedOutConnection);