Magnus Kulke <[EMAIL PROTECTED]>:

> i'm writing an ssl client application for encrypted ftp. (i use SSL_set_fd 
> for IO) however i have the problem that performing an SSL_read, it delivers 
> only parts of the text. i have to perform SSL_read three times to (output 
> looks like this: 'break!200 break!PBSZ 0 successfulbreak!') get the full 
> message. once the message is read SSL_read hangs without returning. so i need 
> to determine wether i can read from the ssl or not. i tried SSL_pending and 
> SSL_want, but both always stated that there's nothing to read, even if a 
> succeeding SSL_read was successful.
> 
> my questions are: 
> 
> do i have any influence on this annoying message-splitting, clientwise? or is 
> this a server issue?

Message will usually be split into blocks of 16 KB.  If fragments are
shorter, this is because the server sends them like that.

> how can i tell wether there is something to read from the ssl, or what might 
> i did wrong that SSL_pending & SSL_want won't work the way they should.

You'll have to use non-blocking I/O, such as O_NONBLOCK if you use
Unix sockets.  SSL_pending only reports data that has already been
processed and buffered by the SSL library; it does not look at any
additional data that may have arrived via the network.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to