diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-04-09 18:45:08 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-27 14:22:18 -0400 |
commit | a16ed90ec8abc329aafe0b893a7533fff480d2ff (patch) | |
tree | 8d93ef7a62ef733ad3a990d428c7242345b443a4 /src/common | |
parent | 865bea3b895831a486b024e90f58d72d025ce284 (diff) | |
download | tor-a16ed90ec8abc329aafe0b893a7533fff480d2ff.tar.gz tor-a16ed90ec8abc329aafe0b893a7533fff480d2ff.zip |
Document and/or fix stuff found by Sebastian in code review
Thanks to Sebastian for his code-review of the bufferevents patch series.x
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/crypto.h | 3 | ||||
-rw-r--r-- | src/common/tortls.c | 2 | ||||
-rw-r--r-- | src/common/tortls.h | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h index a30e5bcbae..c433938d5b 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -238,7 +238,8 @@ void secret_to_key(char *key_out, size_t key_out_len, const char *secret, size_t secret_len, const char *s2k_specifier); #ifdef CRYPTO_PRIVATE -/* Prototypes for private functions only used by tortls.c and crypto.c */ +/* Prototypes for private functions only used by tortls.c, crypto.c, and the + * unit tests. */ struct rsa_st; struct evp_pkey_st; struct dh_st; diff --git a/src/common/tortls.c b/src/common/tortls.c index fb2e9ed499..318cb40887 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -1706,9 +1706,9 @@ tor_tls_init_bufferevent(tor_tls_t *tls, struct bufferevent *bufev_in, tor_assert(evbuffer_get_length(bufferevent_get_output(bufev_in)) == 0); tor_assert(BIO_number_read(SSL_get_rbio(tls->ssl)) == 0); tor_assert(BIO_number_written(SSL_get_rbio(tls->ssl)) == 0); + bufferevent_free(bufev_in); } tls->state = TOR_TLS_ST_BUFFEREVENT; - bufferevent_free(bufev_in); out = bufferevent_openssl_socket_new(tor_libevent_get_base(), socket, tls->ssl, diff --git a/src/common/tortls.h b/src/common/tortls.h index 64ce5c6345..0810d81cd1 100644 --- a/src/common/tortls.h +++ b/src/common/tortls.h @@ -64,9 +64,7 @@ int tor_tls_check_lifetime(tor_tls_t *tls, int tolerance); 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); -#if defined(USE_BUFFEREVENTS) || defined(TORTLS_PRIVATE) int tor_tls_finish_handshake(tor_tls_t *tls); -#endif 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); |