[tor-commits] [tlsdate/master] In verbose mode, display TLS time as well as HTTPS time

ioerror at torproject.org ioerror at torproject.org
Thu Oct 31 10:25:58 UTC 2013


commit f70fba4051e1a1abcf12cebb2cc462ea5bd847cd
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Oct 10 15:16:23 2013 -0400

    In verbose mode, display TLS time as well as HTTPS time
---
 src/tlsdate-helper.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/tlsdate-helper.c b/src/tlsdate-helper.c
index a724402..4dce354 100644
--- a/src/tlsdate-helper.c
+++ b/src/tlsdate-helper.c
@@ -1205,6 +1205,11 @@ run_ssl (uint32_t *time_map, int time_is_an_illusion, int http)
   if (1 != BIO_do_handshake(s_bio))
     die ("SSL handshake failed\n");
 
+  // from /usr/include/openssl/ssl3.h
+  //  ssl->s3->server_random is an unsigned char of 32 bits
+  memcpy(&result_time, ssl->s3->server_random, sizeof (uint32_t));
+  verb("V: In TLS response, T=%lu\n", (unsigned long)ntohl(result_time));
+
   if (http) {
     char buf[1024];
     verb("V: Starting HTTP\n");
@@ -1221,10 +1226,6 @@ run_ssl (uint32_t *time_map, int time_is_an_illusion, int http)
     verb("V: Got HTTP response. T=%lu\n", (unsigned long)result_time);
 
     result_time = htonl(result_time);
-  } else {
-    // from /usr/include/openssl/ssl3.h
-    //  ssl->s3->server_random is an unsigned char of 32 bits
-    memcpy(&result_time, ssl->s3->server_random, sizeof (uint32_t));
   }
 
   // Verify the peer certificate against the CA certs on the local system





More information about the tor-commits mailing list