Here's the stack you asked for:

NTDLL! ZwWaitForSingleObject + 11 bytes
MSAFD! WSPStartup + -19775 bytes
WS2_32! WSARecv + 174 bytes
WSOCK32! recv + 51 bytes
PENSERVER_D! BIO_new_socket + 199 bytes
PENSERVER_D! BIO_read + 87 bytes
PENSERVER_D! ssl23_read_bytes + 45 bytes
PENSERVER_D! ssl23_get_client_hello + 72 bytes
PENSERVER_D! ssl23_accept + 352 bytes
PENSERVER_D! sslv23_base_method + 358 bytes
PENSERVER_D! SSL_write + 94 bytes
__cSocket::Send(const void *, int) line 1636 + 20 bytes

It looks like the problem is simple:  The SSL_write does a READ to negotiate
the Handshake before it does anything else!  The other end is select()ing on
Read handles, and this end is reading, too, so clearly therein lies the
holdup.  What's up with that??  Obviously this indicates a discrepancy in
how SSL sockets work and clear sockets work.

How can I fix this?  Can I force the handshake to take place before the
first SSL_Write?  Can I force  SSL_Write to do a Write of some sort before
it does a Read?  What's the proper way to fix this?

Thanks again for the help!

Bill Rebey

-----Original Message-----
From:   [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Eric Rescorla
Sent:   Wednesday, August 15, 2001 11:36 AM
To:     [EMAIL PROTECTED]
Subject:        Re: Socket hangs on SSL_read/SSL_write

"Bill @ Rebey.com" <[EMAIL PROTECTED]> writes:
> I have a pair of programs that work fine (they can communicate with one
> another) in "clear" (non-SSL mode), but when I switch them to use SSL, the
> SSL_write hangs, as does the SSL_read on the other end.  ( "select"ing for
> Read on the reader's handle doesn't even work - the "select" never trips).
You say the SSL_write() hangs? This in general shouldn't happen
unless you're trying to write something really enormous.
However, if it is happening that would explain why select()
never trips.

Try running the code under the debugger. Then break it
once it's hung (e.g. using Ctrl-C) and let us know what the stack
trace looks like.

-Ekr


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to