> the application read the first
> 1500 bytes, then "select(...)" no more indicates that something has to
> be read on the fd. So the OFTP application behind the gateway doesn't
> send the new "credit authorisation" because it didn't receive the
> complete previous credit. And the sender waits until its inactivity
> timer (more or less 2 minutes) triggers.

You cannot call 'select' to wait for data to be received if that data has
already been received. You should not ever assume that OpenSSL is waiting
for data to arrive on the socket unless it tells you this.

You have broken the fundamental rule of OpenSSL. You *assumed* that
encrypted data received over the wire would mean decrypted data received
from OpenSSL. So because you wanted decrypted data from OpenSSL, you waited
for encrypted data on the wire.

Now this is *sometimes* true. But in this case, it was not true. So your
assumption was false.

Do not ever, ever, ever assume that you know what OpenSSL needs to make
further progress. Because if you assume wrong, you are screwed. There is no
reason you should ever need to make this assumption, since OpenSSL will tell
you what it needs.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to