I understand your answer with respect to SSL_ERROR_WANT_WRITE.
But I'm not sure I understand the SSL_ERROR_WANT_READ
scenario.

How does one implement a protocol "lock step" protocol
on top of OpenSSL?  In other words, how do you handle an
application protocol in which the server will not send any
response until the client sends a complete command?

HTTP is an example of such a protocol.  Suppose a browser
is ready to pass its completel "GET" command to SSL_write().
How can you ensure that SSL_ERROR_WANT_READ does not happen
because the client has nothing further to write into the
SSL context at that point.

Thanks,
Daryl Odnert
[EMAIL PROTECTED]

-----Original Message-----
From: Lutz Jaenicke [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 28, 2002 12:30 PM
To: [EMAIL PROTECTED]
Subject: Re: SSL_write parameters after an SSL_ERROR_WANT_(READ|WRITE)


On Tue, May 28, 2002 at 01:30:47PM -0600, Joel Daniels wrote:
> When an SSL_write() operation has to be repeated because of
> SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE, it must be repeated with the
> same arguments.
> 
> Are there any ways to get around this?

No.

> Here is an example of where this might be a problem:
> Supposing I attempted to write the time of day to an SSL stream, but
failed
> with the error SSL_ERROR_WANT_WRITE.  Later on I discover that I can
write,
> but by this time the time of day has changed by one second.  What am I to
> do?

If the SSL_ERROR_WANT_WRITE state occurs, a number of bytes or all bytes
from your call to SSL_write() may already have been processed, but the
record(s) to be sent to the network obviously didn't fit into the
buffer of the underlying OS.
There is no way for the application to know, what the actual state of the
processing is, hence there is no way to reliably modify the data to be
sent without messing up everything.

Best regards,
        Lutz
-- 
Lutz Jaenicke                             [EMAIL PROTECTED]
http://www.aet.TU-Cottbus.DE/personen/jaenicke/
BTU Cottbus, Allgemeine Elektrotechnik
Universitaetsplatz 3-4, D-03044 Cottbus
______________________________________________________________________
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