diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-11-09 15:36:27 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-11-09 15:36:27 -0500 |
commit | d238d8386fd1b459fa8e31b63363c9bd58e321f9 (patch) | |
tree | d32940a57db5200847db23fc0b29872fd27d5c57 /src/or/connection_or.c | |
parent | 1fb342dfab42f47a2e87d38c536bb9a52f1a0fcd (diff) | |
download | tor-d238d8386fd1b459fa8e31b63363c9bd58e321f9.tar tor-d238d8386fd1b459fa8e31b63363c9bd58e321f9.tar.gz |
Add a testing-only option to use bufferevent_openssl as a filter
We need filtering bufferevent_openssl so that we can wrap around
IOCP bufferevents on Windows. This patch adds a temporary option to
turn on filtering mode, so that we can test it out on non-IOCP
systems to make sure it hasn't got any surprising bugs.
It also fixes some allocation/teardown errors in using
bufferevent_openssl as a filter.
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 467f7be90..5b8236291 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -906,9 +906,10 @@ connection_tls_start_handshake(or_connection_t *conn, int receiving) } #ifdef USE_BUFFEREVENTS if (connection_type_uses_bufferevent(TO_CONN(conn))) { + const int filtering = get_options()->_UseFilteringSSLBufferevents; struct bufferevent *b = tor_tls_init_bufferevent(conn->tls, conn->_base.bufev, conn->_base.s, - receiving); + receiving, filtering); if (!b) { log_warn(LD_BUG,"tor_tls_init_bufferevent failed. Closing."); return -1; |