hello,
i'm writing an SSL client whose transport isn't socket based, so i am using
a BIO pair to manage the I/O.

on one end of the BIO pair is the SSL BIO (ssl_bio) and on the other end the
Client BIO (client_io).

                     ssl_bio )---( client_io

TO WRITE
i write clear text into ssl_bio, read the cipher text from client_io and
pass it on to the interface's send function.

        clear text --> ssl_bio )>>>( client_io --> cipher text --> send

TO READ
i call the interface's recv function, write the returned cipher text to
client_io, and then read the clear text off of ssl_bio

        clear text <-- ssl_bio )<<<( client_io <-- cipher text <-- recv

so for every write, i do a corresponding read.  the problem i am running
into is some responses are large enough that they require multiple reads to
get all of the data.  the reads are blocking so if i blinding read i will
get stuck.  the connection is open so i can't just read until EOF.  i was
hoping that the BIO would have a way of indicating that it only received
partial data and required N more bytes.

is there an api call that indicates that the bio is expecting more data?

how can i determine when more data needs to be retrieved from the interface?

i tried using BIO_get_read_request(), BIO_should_read(), BIO_should_write,
BIO_should_retry(),
BIO_get_retry_reason(), BIO_ctrl_pending() and BIO_ctrl_wpending() with no
luck.

  BIO_get_read_request(client_io) always returns 5
  BIO_should_read(ssl_bio) always returns 1
  BIO_should_retry(ssl_bio) always returns 8

is there a header or something i can read, to determine how many bytes need
to be read?

i am using OpenSSL 0.9.5a and i have the buffer size set to 17K.

any help would be greatly appreciated.
thanks -hugh


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

Reply via email to