summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@gmail.com>2011-10-26 03:12:18 +0200
committerGeorge Kadianakis <desnacked@gmail.com>2011-10-26 03:12:18 +0200
commitecd239e3b577705e0669d47293a2e755cf93cec0 (patch)
treed76bb5fae945b8a54b8b1c63f2c97df921c2de80 /src/or/connection_or.c
parent4fd79f9def28996552b5739792f428c2514de1f6 (diff)
downloadtor-ecd239e3b577705e0669d47293a2e755cf93cec0.tar.gz
tor-ecd239e3b577705e0669d47293a2e755cf93cec0.zip
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.
Diffstat (limited to 'src/or/connection_or.c')
0 files changed, 0 insertions, 0 deletions