On Tue, Apr 12, 2005 at 10:43:46AM +0100, [EMAIL PROTECTED] wrote:
> I am writing a piece of software to negotiate the client side of a TLS
> connection over UDP.  I have initialised openssl by using  
> ...
> To get the client_hello message I call SSL_connect which returns a
> negative result.

Try using SSL_set_connect_state() instead.

> SSL_get_error then informs me that the error is
> SSL_ERROR_WANT_READ.  Then BIO_read is used to read bytes from the
> fromClient BIO.  Those bytes are then sent to the server.  

Ok.

> In response to the server sends me the server_hello data which I am
> writing into the toClient BIO.
> 
> My problem is that I don't know how to get to the next phase of the
> handshake.  How do I tell openssl that there is data on available for it
> to read.  Or does the toClient BIO do that for me.

You should invoke again BIO_read to read handshake data from SSL.
Then, when you receive data from server, call BIO_write.
Repeat this until handshake is finished.

Also take a look at http://eaptls.spe.net/download/ppp-2.4.3-eaptls-0.7.patch
- functions eaptls_init_ssl_client(), eaptls_send(), eaptls_receive().


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

Reply via email to