diff -uarN qbittorrent-4.6.7.old/src/base/net/downloadmanager.cpp qbittorrent-4.6.7/src/base/net/downloadmanager.cpp --- qbittorrent-4.6.7.old/src/base/net/downloadmanager.cpp 2024-09-16 23:12:42.000000000 +0200 +++ qbittorrent-4.6.7/src/base/net/downloadmanager.cpp 2024-11-03 14:41:02.144231415 +0100 @@ -124,10 +124,20 @@ QStringList errorList; for (const QSslError &error : errors) errorList += error.errorString(); - LogMsg(tr("Ignoring SSL error, URL: \"%1\", errors: \"%2\"").arg(reply->url().toString(), errorList.join(u". ")), Log::WARNING); - // Ignore all SSL errors - reply->ignoreSslErrors(); + QString errorMsg; + if (!Preferences::instance()->isIgnoreSSLErrors()) + { + errorMsg = tr("SSL error, URL: \"%1\", errors: \"%2\""); + } + else + { + errorMsg = tr("Ignoring SSL error, URL: \"%1\", errors: \"%2\""); + // Ignore all SSL errors + reply->ignoreSslErrors(); + } + + LogMsg(errorMsg.arg(reply->url().toString(), errorList.join(u". ")), Log::WARNING); }); connect(ProxyConfigurationManager::instance(), &ProxyConfigurationManager::proxyConfigurationChanged diff -uarN qbittorrent-4.6.7.old/src/base/preferences.cpp qbittorrent-4.6.7/src/base/preferences.cpp --- qbittorrent-4.6.7.old/src/base/preferences.cpp 2024-09-16 23:12:42.000000000 +0200 +++ qbittorrent-4.6.7/src/base/preferences.cpp 2024-11-03 14:45:23.426243874 +0100 @@ -1331,6 +1331,19 @@ setValue(u"Preferences/Advanced/trackerPortForwarding"_s, enabled); } +bool Preferences::isIgnoreSSLErrors() const +{ + return value(u"Preferences/Advanced/IgnoreSSLErrors"_s, false); +} + +void Preferences::setIgnoreSSLErrors(const bool enabled) +{ + if (enabled == isIgnoreSSLErrors()) + return; + + setValue(u"Preferences/Advanced/IgnoreSSLErrors"_s, enabled); +} + #if defined(Q_OS_WIN) || defined(Q_OS_MACOS) bool Preferences::isUpdateCheckEnabled() const { diff -uarN qbittorrent-4.6.7.old/src/base/preferences.h qbittorrent-4.6.7/src/base/preferences.h --- qbittorrent-4.6.7.old/src/base/preferences.h 2024-09-16 23:12:42.000000000 +0200 +++ qbittorrent-4.6.7/src/base/preferences.h 2024-11-03 14:46:38.250247442 +0100 @@ -296,6 +296,8 @@ void setTrackerPort(int port); bool isTrackerPortForwardingEnabled() const; void setTrackerPortForwardingEnabled(bool enabled); + bool isIgnoreSSLErrors() const; + void setIgnoreSSLErrors(bool enabled); #if defined(Q_OS_WIN) || defined(Q_OS_MACOS) bool isUpdateCheckEnabled() const; void setUpdateCheckEnabled(bool enabled); diff -uarN qbittorrent-4.6.7.old/src/gui/advancedsettings.cpp qbittorrent-4.6.7/src/gui/advancedsettings.cpp --- qbittorrent-4.6.7.old/src/gui/advancedsettings.cpp 2024-09-16 23:12:42.000000000 +0200 +++ qbittorrent-4.6.7/src/gui/advancedsettings.cpp 2024-11-03 14:56:03.681274404 +0100 @@ -100,6 +100,7 @@ TRACKER_STATUS, TRACKER_PORT, TRACKER_PORT_FORWARDING, + IGNORE_SSL_ERRORS, // libtorrent section LIBTORRENT_HEADER, BDECODE_DEPTH_LIMIT, @@ -318,6 +319,8 @@ pref->setTrackerPort(m_spinBoxTrackerPort.value()); pref->setTrackerPortForwardingEnabled(m_checkBoxTrackerPortForwarding.isChecked()); session->setTrackerEnabled(m_checkBoxTrackerStatus.isChecked()); + // Ignore SSL errors + pref->setIgnoreSSLErrors(m_checkBoxIgnoreSSLErrors.isChecked()); // Choking algorithm session->setChokingAlgorithm(m_comboBoxChokingAlgorithm.currentData().value()); @@ -813,6 +816,11 @@ // Tracker port forwarding m_checkBoxTrackerPortForwarding.setChecked(pref->isTrackerPortForwardingEnabled()); addRow(TRACKER_PORT_FORWARDING, tr("Enable port forwarding for embedded tracker"), &m_checkBoxTrackerPortForwarding); + // Ignore SSL errors + m_checkBoxIgnoreSSLErrors.setChecked(pref->isIgnoreSSLErrors()); + m_checkBoxIgnoreSSLErrors.setToolTip(tr("Affects certificate validation and non-torrent protocol activities (e.g. RSS feeds, program updates, torrent files, geoip db, etc)")); + addRow(IGNORE_SSL_ERRORS, tr("Ignore SSL errors"), &m_checkBoxIgnoreSSLErrors); + // Choking algorithm m_comboBoxChokingAlgorithm.addItem(tr("Fixed slots"), QVariant::fromValue(BitTorrent::ChokingAlgorithm::FixedSlots)); m_comboBoxChokingAlgorithm.addItem(tr("Upload rate based"), QVariant::fromValue(BitTorrent::ChokingAlgorithm::RateBased)); diff -uarN qbittorrent-4.6.7.old/src/gui/advancedsettings.h qbittorrent-4.6.7/src/gui/advancedsettings.h --- qbittorrent-4.6.7.old/src/gui/advancedsettings.h 2024-09-16 23:12:42.000000000 +0200 +++ qbittorrent-4.6.7/src/gui/advancedsettings.h 2024-11-03 14:58:02.443280067 +0100 @@ -77,7 +77,7 @@ m_spinBoxSavePathHistoryLength, m_spinBoxPeerTurnover, m_spinBoxPeerTurnoverCutoff, m_spinBoxPeerTurnoverInterval, m_spinBoxRequestQueueSize; QCheckBox m_checkBoxOsCache, m_checkBoxRecheckCompleted, m_checkBoxResolveCountries, m_checkBoxResolveHosts, m_checkBoxProgramNotifications, m_checkBoxTorrentAddedNotifications, m_checkBoxReannounceWhenAddressChanged, m_checkBoxTrackerFavicon, m_checkBoxTrackerStatus, - m_checkBoxTrackerPortForwarding, m_checkBoxConfirmTorrentRecheck, m_checkBoxConfirmRemoveAllTags, m_checkBoxAnnounceAllTrackers, m_checkBoxAnnounceAllTiers, + m_checkBoxTrackerPortForwarding, m_checkBoxIgnoreSSLErrors, m_checkBoxConfirmTorrentRecheck, m_checkBoxConfirmRemoveAllTags, m_checkBoxAnnounceAllTrackers, m_checkBoxAnnounceAllTiers, m_checkBoxMultiConnectionsPerIp, m_checkBoxValidateHTTPSTrackerCertificate, m_checkBoxSSRFMitigation, m_checkBoxBlockPeersOnPrivilegedPorts, m_checkBoxPieceExtentAffinity, m_checkBoxSuggestMode, m_checkBoxSpeedWidgetEnabled, m_checkBoxIDNSupport; QComboBox m_comboBoxInterface, m_comboBoxInterfaceAddress, m_comboBoxDiskIOReadMode, m_comboBoxDiskIOWriteMode, m_comboBoxUtpMixedMode, m_comboBoxChokingAlgorithm, diff -uarN qbittorrent-4.6.7.old/src/webui/api/appcontroller.cpp qbittorrent-4.6.7/src/webui/api/appcontroller.cpp --- qbittorrent-4.6.7.old/src/webui/api/appcontroller.cpp 2024-09-16 23:12:42.000000000 +0200 +++ qbittorrent-4.6.7/src/webui/api/appcontroller.cpp 2024-11-03 14:41:02.146231416 +0100 @@ -348,6 +348,8 @@ data[u"resolve_peer_countries"_s] = pref->resolvePeerCountries(); // Reannounce to all trackers when ip/port changed data[u"reannounce_when_address_changed"_s] = session->isReannounceWhenAddressChangedEnabled(); + // Ignore SSL errors + data[u"ignore_ssl_errors"_s] = pref->isIgnoreSSLErrors(); // libtorrent preferences // Bdecode depth limit @@ -915,6 +917,9 @@ // Reannounce to all trackers when ip/port changed if (hasKey(u"reannounce_when_address_changed"_s)) session->setReannounceWhenAddressChangedEnabled(it.value().toBool()); + // Ignore SLL errors + if (hasKey(u"ignore_ssl_errors"_s)) + pref->setIgnoreSSLErrors(it.value().toBool()); // libtorrent preferences // Bdecode depth limit diff -uarN qbittorrent-4.6.7.old/src/webui/www/private/views/preferences.html qbittorrent-4.6.7/src/webui/www/private/views/preferences.html --- qbittorrent-4.6.7.old/src/webui/www/private/views/preferences.html 2024-09-16 23:12:42.000000000 +0200 +++ qbittorrent-4.6.7/src/webui/www/private/views/preferences.html 2024-11-03 15:05:06.792300302 +0100 @@ -821,6 +821,14 @@ + + + + + + + + @@ -1077,6 +1085,14 @@ + + + + + + + +
@@ -2268,6 +2284,7 @@ $('refreshInterval').setProperty('value', pref.refresh_interval); $('resolvePeerCountries').setProperty('checked', pref.resolve_peer_countries); $('reannounceWhenAddressChanged').setProperty('checked', pref.reannounce_when_address_changed); + $('ignoreSSLErrors').setProperty('checked', pref.ignore_ssl_errors); // libtorrent section $('bdecodeDepthLimit').setProperty('value', pref.bdecode_depth_limit); $('bdecodeTokenLimit').setProperty('value', pref.bdecode_token_limit); @@ -2709,6 +2726,7 @@ settings.set('refresh_interval', $('refreshInterval').getProperty('value')); settings.set('resolve_peer_countries', $('resolvePeerCountries').getProperty('checked')); settings.set('reannounce_when_address_changed', $('reannounceWhenAddressChanged').getProperty('checked')); + settings.set('ignore_ssl_errors', $('ignoreSSLErrors').getProperty('checked')); // libtorrent section settings.set('bdecode_depth_limit', $('bdecodeDepthLimit').getProperty('value'));