openssl has added secure renegotiation in 0.9.8m and later versions. How do I handle this case? in a server, using a non blocking socket, say an SSL_accept is done. Now the server will check to see if the socket becomes readable. If it, then there are two possibilies, either the socket became readable because the client sent some request OR the client renegotiatied the connection. SSL_MODE_AUTO_RETRY is not applicable as I understnad on non blocking sockets. If the client sent request, SSL_Read needs to be invoked. If the client renegotiated, SSL_accept has to be called. If I call SSL_read when client did renegotiation, it returns with SSL_ERROR_SSL. So how do I determine if I should do SSL_accept or SSL_read. Calling SSL_read again returns with same error.
Thanks for any inputs