[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r13477: Make version negotiation and handshaking messages more usefu (in tor/trunk: . src/common src/or)



Author: nickm
Date: 2008-02-11 23:43:25 -0500 (Mon, 11 Feb 2008)
New Revision: 13477

Modified:
   tor/trunk/
   tor/trunk/src/common/tortls.c
   tor/trunk/src/or/command.c
Log:
 r18041@catbus:  nickm | 2008-02-11 23:43:18 -0500
 Make version negotiation and handshaking messages more useful and accurate.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r18041] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/tortls.c
===================================================================
--- tor/trunk/src/common/tortls.c	2008-02-12 04:37:13 UTC (rev 13476)
+++ tor/trunk/src/common/tortls.c	2008-02-12 04:43:25 UTC (rev 13477)
@@ -921,6 +921,8 @@
                    " get set. Fixing that.");
         }
         tls->wasV2Handshake = 1;
+        log_debug(LD_NET, "Completed V2 TLS handshake with client; waiting "
+                  "for renegotiation."));
       } else {
         tls->wasV2Handshake = 0;
       }
@@ -934,7 +936,8 @@
       if (n_certs > 1 || (n_certs == 1 && cert != sk_X509_value(chain, 0)))
         tls->wasV2Handshake = 0;
       else {
-        log_debug(LD_NET, "I think I got a v2 handshake on %p!", tls);
+        log_debug(LD_NET, "Server sent back a single certificate; looks like "
+                  "a v2 handshake on %p.", tls);
         tls->wasV2Handshake = 1;
       }
       if (cert)

Modified: tor/trunk/src/or/command.c
===================================================================
--- tor/trunk/src/or/command.c	2008-02-12 04:37:13 UTC (rev 13476)
+++ tor/trunk/src/or/command.c	2008-02-12 04:43:25 UTC (rev 13477)
@@ -487,7 +487,7 @@
   conn->link_proto = highest_supported_version;
   conn->handshake_state->received_versions = 1;
 
-  log_info(LD_OR, "Negotiated version %d with %s",
+  log_info(LD_OR, "Negotiated version %d with %s; sending NETINFO.",
            highest_supported_version, safe_str(conn->_base.address));
   tor_assert(conn->link_proto >= 2);
 
@@ -595,8 +595,9 @@
   if (connection_or_set_state_open(conn)<0)
     connection_mark_for_close(TO_CONN(conn));
   else
-    log_info(LD_OR, "Got good NETINFO cell from %s",
-             safe_str(conn->_base.address));
+    log_info(LD_OR, "Got good NETINFO cell from %s; OR connection is now "
+             "open, using protocol version %d",
+             safe_str(conn->_base.address), (int)conn->link_proto);
   assert_connection_ok(TO_CONN(conn),time(NULL));
 }