aboutsummaryrefslogtreecommitdiff
path: root/src/common/tortls.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-11-05 18:13:08 -0500
committerNick Mathewson <nickm@torproject.org>2009-11-05 18:13:08 -0500
commitce0a89e2624471272ffc4950c5069d9b81a7f0b9 (patch)
tree3f430604ba70db318b670429c65e0f21ebca4e5e /src/common/tortls.h
parent54973a45a693cf3e0dada2572016fa6695a51e75 (diff)
downloadtor-ce0a89e2624471272ffc4950c5069d9b81a7f0b9.tar
tor-ce0a89e2624471272ffc4950c5069d9b81a7f0b9.tar.gz
Make Tor work with OpenSSL 0.9.8l
To fix a major security problem related to incorrect use of SSL/TLS renegotiation, OpenSSL has turned off renegotiation by default. We are not affected by this security problem, however, since we do renegotiation right. (Specifically, we never treat a renegotiated credential as authenticating previous communication.) Nevertheless, OpenSSL's new behavior requires us to explicitly turn renegotiation back on in order to get our protocol working again. Amusingly, this is not so simple as "set the flag when you create the SSL object" , since calling connect or accept seems to clear the flags. For belt-and-suspenders purposes, we clear the flag once the Tor handshake is done. There's no way to exploit a second handshake either, but we might as well not allow it.
Diffstat (limited to 'src/common/tortls.h')
-rw-r--r--src/common/tortls.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/tortls.h b/src/common/tortls.h
index d00690911..871fec336 100644
--- a/src/common/tortls.h
+++ b/src/common/tortls.h
@@ -65,6 +65,7 @@ int tor_tls_read(tor_tls_t *tls, char *cp, size_t len);
int tor_tls_write(tor_tls_t *tls, const char *cp, size_t n);
int tor_tls_handshake(tor_tls_t *tls);
int tor_tls_renegotiate(tor_tls_t *tls);
+void tor_tls_block_renegotiation(tor_tls_t *tls);
int tor_tls_shutdown(tor_tls_t *tls);
int tor_tls_get_pending_bytes(tor_tls_t *tls);
size_t tor_tls_get_forced_write_size(tor_tls_t *tls);