]> git.ipfire.org Git - thirdparty/tor.git/commit
Also handle needless renegotiations in SSL_write().
authorGeorge Kadianakis <desnacked@gmail.com>
Wed, 26 Oct 2011 11:36:30 +0000 (13:36 +0200)
committerGeorge Kadianakis <desnacked@gmail.com>
Wed, 26 Oct 2011 11:36:30 +0000 (13:36 +0200)
commite2b3527106e0747f652e2f28fa087d9874e0e2ce
treec8928410de0558d3b5346eb73a640de0c4cf6b68
parent340809dd224b244675496e301d3ba154a6fe68d0
Also handle needless renegotiations in SSL_write().

SSL_read(), SSL_write() and SSL_do_handshake() can always progress the
SSL protocol instead of their normal operation, this means that we
must be checking for needless renegotiations after they return.

Introduce tor_tls_got_excess_renegotiations() which makes the
          tls->server_handshake_count > 2
check for us, and use it in tor_tls_read() and tor_tls_write().

Cases that should not be handled:

* SSL_do_handshake() is only called by tor_tls_renegotiate() which is a
  client-only function.

* The SSL_read() in tor_tls_shutdown() does not need to be handled,
  since SSL_shutdown() will be called if SSL_read() returns an error.
src/common/tortls.c