Hi there,
Please consider the following scenario:
I have tcp server, while a tcp client is connected to the server (blocking
mode). The tcp client is waiting to read a message from the tcp server. Now,
I have another client, which is SSL client which tries to connect to the
same server at the same port! Ok, that is not exactly what I want, but that
situation often happens. The code (excerpt) of my SSL client is like:
....
SSL_set_bio (sslx->ssl, sslx->bio, sslx->bio);
SSL_set_connect_state (sslx->ssl);
while (!done)
{
/* Initiate the state machine... */
/* SSL_get_error() call categorises errors into groups. */
switch (SSL_get_error (sslx->ssl, SSL_do_handshake (sslx->ssl)))
{
case SSL_ERROR_NONE:
/* Handshake has finished, so proceed */
done = 1;
break;
case SSL_ERROR_SSL:
/* Handshake error */
........
What has happened is that the programs hang on SSL_get_error (sslx->ssl,
SSL_do_handshake (sslx->ssl))), or effectively on
SSL_do_hadshake(sslx->ssl). This instruction does not give the output
argument ( I expected a sort of int <= 0 to indicate error) but it hangs.
That is the problem what I am trying to solve. In fact is it openssl bug
when SSL_do_handshake is not giving any error response but hang?
I will very much appreciate if someone could give me advice on how to time
out handshake to prevent the system to hang or that something is wrong in
my code on how I set my SSL connection.
Thanks in advance
Alex Cosic
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]