From 7312306ad8eafee8d999df7f9587107ec0cf36e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Fri, 10 Oct 2014 09:28:40 +0200 Subject: [PATCH] fixed client handshake issue --- NetSSL_Win/src/SecureSocketImpl.cpp | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/NetSSL_Win/src/SecureSocketImpl.cpp b/NetSSL_Win/src/SecureSocketImpl.cpp index e3c8d2f79..17e035768 100644 --- a/NetSSL_Win/src/SecureSocketImpl.cpp +++ b/NetSSL_Win/src/SecureSocketImpl.cpp @@ -864,6 +864,10 @@ SECURITY_STATUS SecureSocketImpl::performClientHandshakeLoop() { performClientHandshakeLoopContinueNeeded(); } + else if (_securityStatus == SEC_E_INCOMPLETE_MESSAGE) + { + performClientHandshakeLoopIncompleteMessage(); + } else if (FAILED(_securityStatus)) { if (_outFlags & ISC_RET_EXTENDED_ERROR) @@ -1176,15 +1180,6 @@ void SecureSocketImpl::clientVerifyCertificate(const std::string& hostName) throw InvalidCertificateException("Host name verification failed"); } - LONG rc = CertVerifyTimeValidity(0, _pPeerCertificate->pCertInfo); - if (rc != 0) - { - VerificationErrorArgs args(cert, 0, SEC_E_CERT_EXPIRED, "The certificate is not yet, or no longer valid"); - SSLManager::instance().ClientVerificationError(this, args); - if (!args.getIgnoreError()) - throw InvalidCertificateException("Expired certificate"); - } - verifyCertificateChainClient(_pPeerCertificate); } @@ -1324,18 +1319,6 @@ void SecureSocketImpl::serverVerifyCertificate() DWORD status = SEC_E_OK; X509Certificate cert(_pPeerCertificate, true); - LONG rc = CertVerifyTimeValidity(0, _pPeerCertificate->pCertInfo); - if (rc != 0) - { - VerificationErrorArgs args(cert, 0, SEC_E_CERT_EXPIRED, "The certificate is not yet, or no longer valid"); - SSLManager::instance().ServerVerificationError(this, args); - - if (!args.getIgnoreError()) - throw SSLException("Expired certificate"); - else - return; - } - PCCERT_CHAIN_CONTEXT pChainContext = NULL; CERT_CHAIN_PARA chainPara; std::memset(&chainPara, 0, sizeof(chainPara));