diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-12-06 19:49:21 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-12-06 19:49:21 -0500 |
commit | 021ff31ba6c303ebf13e12e691ea74ca4b39a693 (patch) | |
tree | f57d63e2884de12aed4321ee9ed58f7442c661bd /src/common | |
parent | fa74af0cfa834edbfe5d02ec22fe7c53699770a3 (diff) | |
download | tor-021ff31ba6c303ebf13e12e691ea74ca4b39a693.tar.gz tor-021ff31ba6c303ebf13e12e691ea74ca4b39a693.zip |
Revert "Get rid of tor_tls_block_renegotiation()."
This reverts commit 340809dd224b244675496e301d3ba154a6fe68d0.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/tortls.c | 10 | ||||
-rw-r--r-- | src/common/tortls.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index ddb5ea1efc..9caf9308bf 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -1572,6 +1572,16 @@ tor_tls_unblock_renegotiation(tor_tls_t *tls) } } +/** If this version of openssl supports it, turn off renegotiation on + * <b>tls</b>. (Our protocol never requires this for security, but it's nice + * to use belt-and-suspenders here.) + */ +void +tor_tls_block_renegotiation(tor_tls_t *tls) +{ + tls->ssl->s3->flags &= ~SSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION; +} + void tor_tls_assert_renegotiation_unblocked(tor_tls_t *tls) { diff --git a/src/common/tortls.h b/src/common/tortls.h index e558df756c..673f18dfe8 100644 --- a/src/common/tortls.h +++ b/src/common/tortls.h @@ -77,6 +77,7 @@ int tor_tls_handshake(tor_tls_t *tls); int tor_tls_finish_handshake(tor_tls_t *tls); int tor_tls_renegotiate(tor_tls_t *tls); void tor_tls_unblock_renegotiation(tor_tls_t *tls); +void tor_tls_block_renegotiation(tor_tls_t *tls); void tor_tls_assert_renegotiation_unblocked(tor_tls_t *tls); int tor_tls_shutdown(tor_tls_t *tls); int tor_tls_get_pending_bytes(tor_tls_t *tls); |