Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add SNI client support
Close #1200
  • Loading branch information
Adam- authored and DarthGandalf committed Dec 5, 2015
1 parent b2ed9d7 commit 47f887c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/znc/Socket.h
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions src/Socket.cpp
Expand Up @@ -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 {
Expand Down

0 comments on commit 47f887c

Please sign in to comment.