r14591@catbus: nickm | 2007-08-16 12:40:30 -0400

Remove support for v0 control protocol in 0.1.2 branch: it has been deprecated for a very long time, and keeping it safe and securable has gotten too darned hard.


svn:r11135
This commit is contained in:
Nick Mathewson 2007-08-16 16:41:48 +00:00
parent 0690f1fd7e
commit 5da1f97670
5 changed files with 92 additions and 660 deletions

View File

@ -1,4 +1,9 @@
Changes in version 0.1.2.xx - 2007-xxxxx
o Removed features:
- We removed support for the old (v0) control protocol. It has been
deprecated since Tor 0.1.1.1-alpha, and keeping it safe and secure
has been more of a headache than it's worth.
o Minor bugfixes (performance):
- Save on most routerlist_assert_ok() calls in routerlist.c,
thus greatly speeding up loading cached-routers from disk on

View File

@ -4,7 +4,7 @@ Backport items for 0.1.2:
o r10994: Disable SENTINELS checking in order to use less RAM in
buffer allocation.
o r11117: cookie auth more usable
- disable v0 control protocol
o disable v0 control protocol
Backport for 0.1.2.x once better tested:

View File

@ -132,10 +132,7 @@ conn_state_to_string(int type, int state)
break;
case CONN_TYPE_CONTROL:
switch (state) {
case CONTROL_CONN_STATE_OPEN_V0: return "open (protocol v0)";
case CONTROL_CONN_STATE_OPEN_V1: return "open (protocol v1)";
case CONTROL_CONN_STATE_NEEDAUTH_V0:
return "waiting for authentication (protocol unknown)";
case CONTROL_CONN_STATE_NEEDAUTH_V1:
return "waiting for authentication (protocol v1)";
}
@ -860,7 +857,7 @@ connection_init_accepted_conn(connection_t *conn, uint8_t listener_type)
conn->state = DIR_CONN_STATE_SERVER_COMMAND_WAIT;
break;
case CONN_TYPE_CONTROL:
conn->state = CONTROL_CONN_STATE_NEEDAUTH_V0;
conn->state = CONTROL_CONN_STATE_NEEDAUTH_V1;
break;
}
return 0;
@ -2121,8 +2118,7 @@ connection_state_is_open(connection_t *conn)
(conn->type == CONN_TYPE_AP && conn->state == AP_CONN_STATE_OPEN) ||
(conn->type == CONN_TYPE_EXIT && conn->state == EXIT_CONN_STATE_OPEN) ||
(conn->type == CONN_TYPE_CONTROL &&
(conn->state == CONTROL_CONN_STATE_OPEN_V0 ||
conn->state == CONTROL_CONN_STATE_OPEN_V1)))
conn->state == CONTROL_CONN_STATE_OPEN_V1))
return 1;
return 0;

File diff suppressed because it is too large Load Diff

View File

@ -341,17 +341,11 @@ typedef enum {
#define DIR_CONN_IS_SERVER(conn) ((conn)->purpose == DIR_PURPOSE_SERVER)
#define _CONTROL_CONN_STATE_MIN 1
/** State for a control connection: Authenticated and accepting v0 commands. */
#define CONTROL_CONN_STATE_OPEN_V0 1
/** State for a control connection: Authenticated and accepting v1 commands. */
#define CONTROL_CONN_STATE_OPEN_V1 2
/** State for a control connection: Waiting for authentication; either
* speaking v0 commands or waiting for evidence that it's a v1
* connection. */
#define CONTROL_CONN_STATE_NEEDAUTH_V0 3
/** State for a control connection: Waiting for authentication; speaking
* protocol v1. */
#define CONTROL_CONN_STATE_NEEDAUTH_V1 4
#define CONTROL_CONN_STATE_NEEDAUTH_V1 3
#define _CONTROL_CONN_STATE_MAX 4
#define _DIR_PURPOSE_MIN 1