diff options
author | Roger Dingledine <arma@torproject.org> | 2005-04-25 17:23:52 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-04-25 17:23:52 +0000 |
commit | 662cfc976dc6d99c6e3e6f5d7664866cd58d48cc (patch) | |
tree | d869aaddb19fac503a1012ea6d27d6d8804d58f1 /src/or/connection_or.c | |
parent | f3ea883ccd27e9ffca44cd0e55060cf1ce090c6a (diff) | |
download | tor-662cfc976dc6d99c6e3e6f5d7664866cd58d48cc.tar.gz tor-662cfc976dc6d99c6e3e6f5d7664866cd58d48cc.zip |
only call the connection open once we've decided we like the cert.
svn:r4112
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 4c9163e696..461ca96922 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -440,8 +440,6 @@ connection_tls_finish_handshake(connection_t *conn) { int severity = (authdir_mode(options) || !server_mode(options)) ? LOG_WARN : LOG_INFO; - conn->state = OR_CONN_STATE_OPEN; - connection_watch_events(conn, EV_READ); log_fn(LOG_DEBUG,"tls handshake done. verifying."); check_no_tls_errors(); if (! tor_tls_peer_has_cert(conn->tls)) { @@ -542,8 +540,9 @@ connection_tls_finish_handshake(connection_t *conn) { } directory_set_dirty(); + conn->state = OR_CONN_STATE_OPEN; + connection_watch_events(conn, EV_READ); circuit_n_conn_done(conn, 1); /* send the pending creates, if any. */ - /* Note the success */ rep_hist_note_connect_succeeded(conn->identity_digest, time(NULL)); control_event_or_conn_status(conn, OR_CONN_EVENT_CONNECTED); return 0; |