> I have a 'problem' that has been reported before, namely that only the
> first 32k of my messages are being sent/read by my openSSL
> client/server.
>
> The original post is here:
> http://marc.theaimsgroup.com/?l=openssl-users&m=101180918225646&w=2.
>
> The solution given was to read the man pages for SSL_read & SSL_write,
> but -- probably because I'm not as experienced as others -- I am still
> stumped.
>
> My code uses blocking sockets, has the SSL_CTX
> SSL_MODE_ENABLE_PARTIAL_WRITE option set and loops on the ssl_read but
> the socket is closed after the first 32k is sent.
>
> Why, if a message block size is 16k, does the first 32k of a message
> get written/read, then the socket dropped?
>
> I'm hoping someone with some patience can help me here...
>
> Thanks in advance, I'm sorry if this is a trivial question for some,
> but I'm still learning how OpenSSL works...

        Give us example code or more detailed information about what you mean by
"the socket dropped" and how you determined that.

        My bet is simply that there's a bug in your code. With non-blocking
sockets, you have to test the return value of SSL_read and properly handle
partial or failed sends. You may get a failed send if there was insufficient
space to fit a single block of protocol data (or if protocol data was sent
that corresponds to zero bytes of application data!). You may get a partial
send.

        DS


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

Reply via email to