mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Add HTTPS tracker certificate validation option
This commit adds a new libtorrent setting to validate HTTPS tracker certificates. When enabled, libtorrent will validate the certificate of HTTPS trackers against the system's certificate store. This option is only enabled on libtorrent versions >= 1.2.6 and on non-Windows systems, as OpenSSL does not use the system's certificate store on Windows.
This commit is contained in:
@@ -46,6 +46,10 @@
|
||||
#include "sessionstatus.h"
|
||||
#include "torrentinfo.h"
|
||||
|
||||
#if ((LIBTORRENT_VERSION_NUM >= 10206) && !defined(Q_OS_WIN))
|
||||
#define HAS_HTTPS_TRACKER_VALIDATION
|
||||
#endif
|
||||
|
||||
class QFile;
|
||||
class QNetworkConfiguration;
|
||||
class QNetworkConfigurationManager;
|
||||
@@ -399,6 +403,8 @@ namespace BitTorrent
|
||||
void setUtpMixedMode(MixedModeAlgorithm mode);
|
||||
bool multiConnectionsPerIpEnabled() const;
|
||||
void setMultiConnectionsPerIpEnabled(bool enabled);
|
||||
bool validateHTTPSTrackerCertificate() const;
|
||||
void setValidateHTTPSTrackerCertificate(bool enabled);
|
||||
bool isTrackerFilteringEnabled() const;
|
||||
void setTrackerFilteringEnabled(bool enabled);
|
||||
QStringList bannedIPs() const;
|
||||
@@ -660,6 +666,7 @@ namespace BitTorrent
|
||||
CachedSettingValue<bool> m_isUTPRateLimited;
|
||||
CachedSettingValue<MixedModeAlgorithm> m_utpMixedMode;
|
||||
CachedSettingValue<bool> m_multiConnectionsPerIpEnabled;
|
||||
CachedSettingValue<bool> m_validateHTTPSTrackerCertificate;
|
||||
CachedSettingValue<bool> m_isAddTrackersEnabled;
|
||||
CachedSettingValue<QString> m_additionalTrackers;
|
||||
CachedSettingValue<qreal> m_globalMaxRatio;
|
||||
|
||||
Reference in New Issue
Block a user