Nobody knows? Does OpenSSL support renegotiation? I will be very grateful for answers because there is no any info about this in the net. 09.03.2015, 00:36, "Serj Rakitov" <rasjv at yandex.com>: > Hello > > I want to test SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. > I have client and server. Server is sending data to the client. Client is reading data. > After some bytes sent server initiates a rehandshake to cause SSL_ERROR_WANT_WRITE on client. But there is no rehandshake. On server SSL_do_handshake returns <0 and SSL_get_error returns SSL_ERROR_WANT_READ. And on client SSL_read returns<0 and SSL_get_error also returns SSL_ERROR_WANT_READ. > > The code to rehandshake is: > SSL_set_session_id_context(...); > SSL_renegotiate(...) > SSL_do_handshake(...); > ssl->state=SSL_ST_ACCEPT; > //process SSL_do_handshake (WANT_READ/WANT_WRITE) > > How to make a rehandshake from server side? Best Regards, Serj Rakitov