On 11 Jul 2011, at 3:18 PM, Carla Strembicke wrote: > The server recieves the encrypted data and sends to the lower level and > where it is pumped into the SSL structure ( which is using these memory > buffers) using the BIO_write call ( I acutally see that bytes are written > into it) and the buffer looks good. I then go and do an SSL_read() and I get > nothing except SSL_ERRO_WANT_READ. I do see that a session has been > established and that the packet member actually contains the data I want > access to....but the member state=8576 and rstate=240. > > What am I missing???? > Is it somthing to do this the handshake that I am missing or the readinf of > the data.
During the initial handshake (and a few other times) the two ends of the connection will need to send several messages back and forth before any cleartext data appears. Is it possible that the client or server has written a message to the buffer, and is returning SSL_WANT_READ because it is waiting for a response from the other side? Are you checking for data written to your _out BIO and copying it to the socket even when you are reading? See: http://www.openssl.org/support/faq.html#PROG10 If you look in ssl.h/ssl2.h/ssl3.h you can decode the state values (or use SSL_state_string_long()) to describe the connection's current state: 8576 = 0x2180 = SSL_ST_ACCEPT|SSL3_ST_SR_CERT_A which is part of the connection setup still, I think. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org