Skip to content

Commit 15e26a6

Browse files
committed
qt: Force TLS1.0+ for SSL connections
1 parent 086cb33 commit 15e26a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/qt/bitcoin.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#include <QThread>
4949
#include <QTimer>
5050
#include <QTranslator>
51+
#include <QSslConfiguration>
5152

5253
#if defined(QT_STATICPLUGIN)
5354
#include <QtPlugin>
@@ -515,6 +516,13 @@ int main(int argc, char *argv[])
515516
#ifdef Q_OS_MAC
516517
QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
517518
#endif
519+
#if QT_VERSION >= 0x050500
520+
// Because of the POODLE attack it is recommended to disable SSLv3 (https://disablessl3.com/),
521+
// so set SSL protocols to TLS1.0+.
522+
QSslConfiguration sslconf = QSslConfiguration::defaultConfiguration();
523+
sslconf.setProtocol(QSsl::TlsV1_0OrLater);
524+
QSslConfiguration::setDefaultConfiguration(sslconf);
525+
#endif
518526

519527
// Register meta types used for QMetaObject::invokeMethod
520528
qRegisterMetaType< bool* >();

0 commit comments

Comments
 (0)