On Thu, Nov 09, 2000 at 01:25:37PM -0500, Paul Kudlawiec wrote:

[...]
> Under closer examination, when openssl executes the ssl3_server_hello
> portion
> of the protocol, readsocket (line 191) returns with -1 and outl > 0 with no
> bytes read within variable out. While executing line 200, openssl discovers
> that the error is WSAEWOULDBLOCK (10035), and sets the appropriate flags for
> retrying the socket. Instead of immediately retrying the socket, each
> function
> called in the stack within openssl, passes -1 to the function calling it all
> the way up to SSL_write. If recv waited a few milliseconds more, the data
> would
> be available.
> 
> After receiving a -1 from SSL_write, if someone tries calling it again, the
> same error occurs. By calling it again, the whole process is started rather
> than retrying to receive the last message.

How is 'calling again' different from 'retrying'?  After SSL_write has
returned, SSL_get_error should report SSL_ERROR_WANT_READ in this
case, meaning that the SSL_write call should be repeated as soon as
data is available for reading at the underlying socket.  Why the
socket reports WSAEWOULDBLOCK in the first place when it is supposed
to be blocking is a question that only your OS manufacturer can
answer, I'm afraid.


-- 
Bodo M�ller <[EMAIL PROTECTED]>
PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html
* TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt
* Tel. +49-6151-16-6628, Fax +49-6151-16-6036
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to