[or-cvs] Add fingerprint to router format in tests

Nick Mathewson nickm at seul.org
Thu Jul 22 20:34:57 UTC 2004


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv31909/src/or

Modified Files:
	test.c 
Log Message:
Add fingerprint to router format in tests

Index: test.c
===================================================================
RCS file: /home/or/cvsroot/src/or/test.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- test.c	22 Jul 2004 08:30:06 -0000	1.103
+++ test.c	22 Jul 2004 20:34:55 -0000	1.104
@@ -652,6 +652,7 @@
 {
   char buf[8192], buf2[8192];
   char platform[256];
+  char fingerprint[FINGERPRINT_LEN+1];
   char *pk1_str = NULL, *pk2_str = NULL, *pk3_str = NULL, *cp;
   int pk1_str_len, pk2_str_len, pk3_str_len;
   routerinfo_t r1, r2;
@@ -725,7 +726,10 @@
   strcat(buf2, get_uname());
   strcat(buf2, "\n"
          "published 1970-01-01 00:00:00\n"
-         "opt uptime 0\n"
+         "opt fingerprint ");
+  crypto_pk_get_fingerprint(pk2, fingerprint);
+  strcat(buf2, fingerprint);
+  strcat(buf2, "\nopt uptime 0\n"
   /* XXX the "0" above is hardcoded, but even if we made it reflect
    * uptime, that still wouldn't make it right, because the two
    * descriptors might be made on different seconds... hm. */



More information about the tor-commits mailing list