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

[or-cvs] bugfix: only require the correct key if the nickname is for



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	connection_or.c 
Log Message:
bugfix: only require the correct key if the nickname is for
a verified router


Index: connection_or.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_or.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- connection_or.c	21 Jul 2004 02:42:49 -0000	1.120
+++ connection_or.c	21 Jul 2004 18:20:09 -0000	1.121
@@ -309,7 +309,8 @@
   crypto_free_pk_env(identity_rcvd);
 
   router = router_get_by_nickname(nickname);
-  if(router && /* we know this nickname; make sure it's the right guy */
+  if(router && /* we know this nickname */
+     router->is_verified && /* make sure it's the right guy */
      memcmp(digest_rcvd, router->identity_digest, DIGEST_LEN) != 0) {
     log_fn(LOG_WARN, "Identity key not as expected for %s", nickname);
     return -1;