Hello,

I am writing a server with epoll and openssl (SSL has no knowledge of the
connection), and I have some trouble with the BIOs.

I create the internal & network BIOs with BIO_new_bio_pair(),

Then I set the internal BIO as the BIO of read/write of the SSL object :
SSL_set_bio(ssl, internal_bio, internal_bio)

Then I do the accept & ask the handshake. The handshake sends back
a SSL_ERROR_WANT_READ, which is normal as SSL needs the client HELLO.

After that I try to give to SSL the buffer "buf" containing the client
hello :
BIO_write(CONN->network_bio, buf, count);

The BIO_write sends back the number of bytes of the client hello.

But that doesn't work, because when the handshake is re executed I still
get a WANT_READ in response, instead of a WANT_WRITE (to send the server
HELLO).

What I am missing ?

Best regards,

Simon

Reply via email to