From 52a4548d51d3b9a49bcd92fa69093fb7c3dab49f Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 5 Dec 2015 17:54:23 +0000 Subject: [PATCH] Fix style a bit. --- include/znc/Socket.h | 6 +++--- src/Socket.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/znc/Socket.h b/include/znc/Socket.h index d1293f91..df091f03 100644 --- a/include/znc/Socket.h +++ b/include/znc/Socket.h @@ -29,13 +29,13 @@ public: CZNCSock(const CString& sHost, u_short port, int timeout = 60); ~CZNCSock() {} - int ConvertAddress(const struct sockaddr_storage * pAddr, socklen_t iAddrLen, CS_STRING & sIP, u_short * piPort) const override; + int ConvertAddress(const struct sockaddr_storage* pAddr, socklen_t iAddrLen, CString& sIP, u_short* piPort) const override; #ifdef HAVE_LIBSSL int VerifyPeerCertificate(int iPreVerify, X509_STORE_CTX * pStoreCTX) override; void SSLHandShakeFinished() override; bool SNIConfigureClient(CString& sHostname) override; #endif - void SetHostToVerifySSL(const CString& sHost) { m_HostToVerifySSL = sHost; } + void SetHostToVerifySSL(const CString& sHost) { m_sHostToVerifySSL = sHost; } CString GetSSLPeerFingerprint() const; void SetSSLTrustedPeerFingerprints(const SCString& ssFPs) { m_ssTrustedFingerprints = ssFPs; } @@ -52,7 +52,7 @@ protected: }; private: - CString m_HostToVerifySSL; + CString m_sHostToVerifySSL; SCString m_ssTrustedFingerprints; SCString m_ssCertVerificationErrors; }; diff --git a/src/Socket.cpp b/src/Socket.cpp index b76d827b..2787caa9 100644 --- a/src/Socket.cpp +++ b/src/Socket.cpp @@ -40,7 +40,7 @@ static CString ZNC_DefaultCipher() { } #endif -CZNCSock::CZNCSock(int timeout) : Csock(timeout), m_HostToVerifySSL(""), m_ssTrustedFingerprints(), m_ssCertVerificationErrors() { +CZNCSock::CZNCSock(int timeout) : Csock(timeout), m_sHostToVerifySSL(""), m_ssTrustedFingerprints(), m_ssCertVerificationErrors() { #ifdef HAVE_LIBSSL DisableSSLCompression(); FollowSSLCipherServerPreference(); @@ -53,7 +53,7 @@ CZNCSock::CZNCSock(int timeout) : Csock(timeout), m_HostToVerifySSL(""), m_ssTru #endif } -CZNCSock::CZNCSock(const CString& sHost, u_short port, int timeout) : Csock(sHost, port, timeout), m_HostToVerifySSL(""), m_ssTrustedFingerprints(), m_ssCertVerificationErrors() { +CZNCSock::CZNCSock(const CString& sHost, u_short port, int timeout) : Csock(sHost, port, timeout), m_sHostToVerifySSL(""), m_ssTrustedFingerprints(), m_ssCertVerificationErrors() { #ifdef HAVE_LIBSSL DisableSSLCompression(); FollowSSLCipherServerPreference(); @@ -79,7 +79,7 @@ unsigned int CSockManager::GetAnonConnectionCount(const CString &sIP) const { return ret; } -int CZNCSock::ConvertAddress(const struct sockaddr_storage * pAddr, socklen_t iAddrLen, CS_STRING & sIP, u_short * piPort) const { +int CZNCSock::ConvertAddress(const struct sockaddr_storage* pAddr, socklen_t iAddrLen, CString& sIP, u_short* piPort) const { int ret = Csock::ConvertAddress(pAddr, iAddrLen, sIP, piPort); if (ret == 0) sIP.TrimPrefix("::ffff:"); @@ -107,7 +107,7 @@ void CZNCSock::SSLHandShakeFinished() { return; } CString sHostVerifyError; - if (!ZNC_SSLVerifyHost(m_HostToVerifySSL, pCert, sHostVerifyError)) { + if (!ZNC_SSLVerifyHost(m_sHostToVerifySSL, pCert, sHostVerifyError)) { m_ssCertVerificationErrors.insert(sHostVerifyError); } X509_free(pCert); @@ -128,7 +128,7 @@ void CZNCSock::SSLHandShakeFinished() { } bool CZNCSock::SNIConfigureClient(CString& sHostname) { - sHostname = m_HostToVerifySSL; + sHostname = m_sHostToVerifySSL; return true; } #endif