summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2012-12-05 18:38:42 +0200
committerNick Mathewson <nickm@torproject.org>2013-07-18 14:59:56 -0400
commit93b9f85d410aba1202b72e169ce386c783136b26 (patch)
tree27f9b06481a7a4d15a81665cfbd251f00cb14aca /src/or/connection.c
parentd303228ecae1d4c5d9a242b12a4546366544a170 (diff)
downloadtor-93b9f85d410aba1202b72e169ce386c783136b26.tar.gz
tor-93b9f85d410aba1202b72e169ce386c783136b26.zip
Prepare codebase for the implementation of Extended ORPort auth.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index ad8e39c9a1..9aea501cf6 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -170,6 +170,12 @@ conn_state_to_string(int type, int state)
break;
case CONN_TYPE_EXT_OR:
switch (state) {
+ case EXT_OR_CONN_STATE_AUTH_WAIT_AUTH_TYPE:
+ return "waiting for authentication type";
+ case EXT_OR_CONN_STATE_AUTH_WAIT_CLIENT_NONCE:
+ return "waiting for client nonce";
+ case EXT_OR_CONN_STATE_AUTH_WAIT_CLIENT_HASH:
+ return "waiting for client hash";
case EXT_OR_CONN_STATE_OPEN: return "open";
case EXT_OR_CONN_STATE_FLUSHING: return "flushing final OKAY";
}
@@ -1398,8 +1404,7 @@ connection_init_accepted_conn(connection_t *conn,
switch (conn->type) {
case CONN_TYPE_EXT_OR:
- conn->state = EXT_OR_CONN_STATE_OPEN;
- break;
+ return connection_ext_or_start_auth(TO_OR_CONN(conn));
case CONN_TYPE_OR:
control_event_or_conn_status(TO_OR_CONN(conn), OR_CONN_EVENT_NEW, 0);
rv = connection_tls_start_handshake(TO_OR_CONN(conn), 1);
@@ -4450,6 +4455,7 @@ assert_connection_ok(connection_t *conn, time_t now)
case CONN_TYPE_OR:
tor_assert(conn->state >= OR_CONN_STATE_MIN_);
tor_assert(conn->state <= OR_CONN_STATE_MAX_);
+ break;
case CONN_TYPE_EXT_OR:
tor_assert(conn->state >= EXT_OR_CONN_STATE_MIN_);
tor_assert(conn->state <= EXT_OR_CONN_STATE_MAX_);