> There is no need for the data buffer to stay constant between calls to
> SSL_write.
>
> Arne

Did you see my post proving that this must be false? Here's the scenario
again:

1) You try to write 16 bytes on a non-blocking SSL connection.

2) This results in a 24 byte record after encryption.

3) All but the last byte is sent, SSL gets "would block" when it tries to
send the last byte. (TCP does not have a "send all or nothing" function.
This can always happen no matter what OpenSSL says).

4) The other end will definitely get all the 16 bytes you wrote eventually
(since they're almost completely sent), but it will not actually receive any
of them until that last byte of the record is sent. Sending anything but
that last byte breaks the SSL protocol.

5) OpenSSL cannot return '16' from SSL_write in this case because if it did,
you would expect the other end to receive and process the 16 bytes you sent
even if you don't call SSL_write or SSL_read again. (OpenSSL has no
background service threads or anything. If you don't call into it, it will
never send that last byte.)

6) Thus OpenSSL must return some number other than 16; however, if you do
not realize that the other end will ultimately get the exact 16 bytes you
just sent, things break.

So what happens if the buffer changes in this case? If you think this cannot
happen, please explain why.

DS


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

Reply via email to