mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
Merge pull request #1277 from xnrand/master
Add network-specific settings for cert validation
This commit is contained in:
@@ -266,6 +266,12 @@ class CIRCNetwork {
|
||||
m_uJoinDelay = uJoinDelay;
|
||||
}
|
||||
|
||||
void SetTrustAllCerts(const bool bTrustAll = false) { m_bTrustAllCerts = bTrustAll; }
|
||||
bool GetTrustAllCerts() const { return m_bTrustAllCerts; }
|
||||
|
||||
void SetTrustPKI(const bool bTrustPKI = true) { m_bTrustPKI = bTrustPKI; }
|
||||
bool GetTrustPKI() const { return m_bTrustPKI; }
|
||||
|
||||
unsigned long long BytesRead() const { return m_uBytesRead; }
|
||||
unsigned long long BytesWritten() const { return m_uBytesWritten; }
|
||||
|
||||
@@ -305,6 +311,8 @@ class CIRCNetwork {
|
||||
CString m_sChanPrefixes;
|
||||
|
||||
bool m_bIRCConnectEnabled;
|
||||
bool m_bTrustAllCerts;
|
||||
bool m_bTrustPKI;
|
||||
CString m_sIRCServer;
|
||||
std::vector<CServer*> m_vServers;
|
||||
size_t m_uServerIdx; ///< Index in m_vServers of our current server + 1
|
||||
|
||||
@@ -46,6 +46,12 @@ class CZNCSock : public Csock, public CCoreTranslationMixin {
|
||||
m_ssTrustedFingerprints = ssFPs;
|
||||
}
|
||||
|
||||
void SetTrustAllCerts(const bool bTrustAll = false) { m_bTrustAllCerts = bTrustAll; }
|
||||
bool GetTrustAllCerts() const { return m_bTrustAllCerts; }
|
||||
|
||||
void SetTrustPKI(const bool bTrustPKI = true) { m_bTrustPKI = bTrustPKI; }
|
||||
bool GetTrustPKI() const { return m_bTrustPKI; }
|
||||
|
||||
void SetEncoding(const CString&);
|
||||
|
||||
virtual CString GetRemoteIP() const { return Csock::GetRemoteIP(); }
|
||||
@@ -60,6 +66,8 @@ class CZNCSock : public Csock, public CCoreTranslationMixin {
|
||||
CString m_sHostToVerifySSL;
|
||||
SCString m_ssTrustedFingerprints;
|
||||
SCString m_ssCertVerificationErrors;
|
||||
bool m_bTrustAllCerts;
|
||||
bool m_bTrustPKI;
|
||||
};
|
||||
|
||||
enum EAddrType { ADDR_IPV4ONLY, ADDR_IPV6ONLY, ADDR_ALL };
|
||||
|
||||
Reference in New Issue
Block a user