Hi,
me again :-) I'm running into serious problems when trying to connect to a
server which does know nothing about SSL.
I.e. connecting to a telnet server with the following code snippet seems to
run into an infinite loop.
---------------
SSL_METHOD* pSSLMeth;
X509* pcrtCertificate;
// Should timeout by itself
if(connect(m_hSocket, psa, sizeof(SOCKADDR)) == SOCKET_ERROR)
{
throw "CSSLSocket::Connect";
}
pSSLMeth = SSLv3_client_method();
m_psscContext = SSL_CTX_new (pSSLMeth);
// Set timeout according connect timeout ???
SSL_CTX_set_timeout(m_psscContext, 1);//(ANSWER_TIMEOUT_TIME / 1000) + 4);
// Create context and connect file descriptor(handle)
m_pSSL = SSL_new (m_psscContext);
ASSERT(m_pSSL != NULL);
SSL_set_fd(m_pSSL, m_hSocket);
SSL_connect(m_pSSL);
----------------
SSL_connect never returns, using SSL_CTX_set_timeout did have to effect.
Please heeeeelp......
Thanks, Rainer
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]