Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add SNI client support
- Loading branch information
Showing
with
6 additions
and
0 deletions.
-
+1
−0
include/znc/Socket.h
-
+5
−0
src/Socket.cpp
|
@@ -33,6 +33,7 @@ class CZNCSock : public Csock { |
|
|
#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; } |
|
|
CString GetSSLPeerFingerprint() const; |
|
|
|
@@ -126,6 +126,11 @@ void CZNCSock::SSLHandShakeFinished() { |
|
|
CallSockError(errnoBadSSLCert, sErrorMsg); |
|
|
Close(); |
|
|
} |
|
|
|
|
|
bool CZNCSock::SNIConfigureClient(CString& sHostname) { |
|
|
sHostname = m_HostToVerifySSL; |
|
|
return true; |
|
|
} |
|
|
#endif |
|
|
|
|
|
CString CZNCSock::GetSSLPeerFingerprint() const { |
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.