aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-15 11:13:49 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-15 11:15:43 -0400
commite3243ad5f6a2c6acfd671e2cab22c4b6a4c21f47 (patch)
tree1bed24147eff68e847a67f62ea78a45ba1ae2bdd /src
parent5905a0b2dbcff8bd07e179750f53a8f010b4a5e0 (diff)
downloadtor-e3243ad5f6a2c6acfd671e2cab22c4b6a4c21f47.tar
tor-e3243ad5f6a2c6acfd671e2cab22c4b6a4c21f47.tar.gz
Treat SW_SERVER_HELLO_B as another sign of an SSL handshake
We've been only treating SW_SERVER_HELLO_A as meaning that an SSL handshake was happening. But that's not right: if the initial attempt to write a ServerHello fails, we would get a callback in state SW_SERVER_HELLO_B instead. (That's "instead" and not "in addition": any failed attempt to write the hello will fail and cause the info callback not to get written.) Fix for bug 4592; bugfix on 0.2.0.13-alpha.
Diffstat (limited to 'src')
-rw-r--r--src/common/tortls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 4c9d2188d..c54ed46f3 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -951,7 +951,8 @@ tor_tls_server_info_callback(const SSL *ssl, int type, int val)
(void) val;
if (type != SSL_CB_ACCEPT_LOOP)
return;
- if (ssl->state != SSL3_ST_SW_SRVR_HELLO_A)
+ if ((ssl->state != SSL3_ST_SW_SRVR_HELLO_A) &&
+ (ssl->state != SSL3_ST_SW_SRVR_HELLO_B))
return;
tls = tor_tls_get_by_ssl(ssl);