Platform: AIX 5.3
Compiler: xlc_r
SSL: openssl-0.9.7d

Problem Description:

C++ code using non-blocking sockets.
SSL_CTX_new(TLSv1_client_method());
SSL_CTX_set_mode(m_ctx, SSL_MODE_AUTO_RETRY);

We are seeing instances where SSL_connect() returns -1, which is normal for 
non-blocking sockets.  A call to SSL_get_error() always returns 
SSL_ERROR_SYSCALL while calls to SSL_want() will return either SSL_READING or 
SSL_WRITING.  In the case of SSL_READING, a subsequent call to SSL_connect() 
will complete the handshake.  However, when SSL_want() returns SSL_WRITING, we 
cannot proceed.  For SSL_WRITING a subsequent call to SSL_connect() results in 
the socket closing unexpectedly.  If we attach a callback to the socket, an 
infinite callback loop ensues.  If we wait and reissue the SSL_want(), 
SSL_WRITING is always returned.

How do we proceed when faced with the SSL_WRITING state during the handshake?  
Thanks.



Pete Loevinger/COMSYS
IS&GS Civil
Rockville, MD 870/3A30
(301) 640-3565



Reply via email to