]> git.ipfire.org Git - thirdparty/tor.git/commit
Detect and deny excess renegotiations attempts.
authorGeorge Kadianakis <desnacked@gmail.com>
Wed, 26 Oct 2011 01:12:18 +0000 (03:12 +0200)
committerGeorge Kadianakis <desnacked@gmail.com>
Wed, 26 Oct 2011 01:12:18 +0000 (03:12 +0200)
commitecd239e3b577705e0669d47293a2e755cf93cec0
treed76bb5fae945b8a54b8b1c63f2c97df921c2de80
parent4fd79f9def28996552b5739792f428c2514de1f6
Detect and deny excess renegotiations attempts.

Switch 'server_handshake_count' from a uint8_t to 2 unsigned int bits.
Since we won't ever be doing more than 3 handshakes, we don't need the
extra space.

Toggle tor_tls_t.got_renegotiate based on the server_handshake_count.
Also assert that when we've done two handshakes as a server (the initial
SSL handshake, and the renegotiation handshake) we've just
renegotiated.

Finally, in tor_tls_read() return an error if we see more than 2
handshakes.
src/common/tortls.c