Permalink
Browse files

Add SNI client support

Close #1200
  • Loading branch information...
Adam- authored and DarthGandalf committed Dec 4, 2015
1 parent b2ed9d7 commit 47f887ce435c0c6559cf5aea34dd3697d0e2c015
Showing with 6 additions and 0 deletions.
  1. +1 −0 include/znc/Socket.h
  2. +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 {

0 comments on commit 47f887c

Please sign in to comment.