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

[tor-commits] [tor/master] Remove MIN_METHOD_FOR_ID_HASH_IN_MD and a test for running without it.



commit caf766991dfd82dd1599ce90adc8afb9e749f468
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Apr 9 14:54:46 2018 -0400

    Remove MIN_METHOD_FOR_ID_HASH_IN_MD and a test for running without it.
---
 src/or/dirvote.c          |  2 +-
 src/or/dirvote.h          |  4 ----
 src/test/test_microdesc.c | 19 -------------------
 3 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 334ebfb7f..1a21def46 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -3862,7 +3862,7 @@ dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method)
     tor_free(p6);
   }
 
-  if (consensus_method >= MIN_METHOD_FOR_ID_HASH_IN_MD) {
+  {
     char idbuf[ED25519_BASE64_LEN+1];
     const char *keytype;
     if (consensus_method >= MIN_METHOD_FOR_ED25519_ID_IN_MD &&
diff --git a/src/or/dirvote.h b/src/or/dirvote.h
index 311bc61e1..334dc0732 100644
--- a/src/or/dirvote.h
+++ b/src/or/dirvote.h
@@ -61,10 +61,6 @@
 /** The highest consensus method that we currently support. */
 #define MAX_SUPPORTED_CONSENSUS_METHOD 28
 
-/** Lowest consensus method where authorities may include an "id" line in
- * microdescriptors. */
-#define MIN_METHOD_FOR_ID_HASH_IN_MD 18
-
 /** Lowest consensus method where we include "package" lines*/
 #define MIN_METHOD_FOR_PACKAGE_LINES 19
 
diff --git a/src/test/test_microdesc.c b/src/test/test_microdesc.c
index c0eced1bb..fc565ebf3 100644
--- a/src/test/test_microdesc.c
+++ b/src/test/test_microdesc.c
@@ -385,16 +385,6 @@ static const char test_ri2[] =
   "cf34GXHv61XReJF3AlzNHFpbrPOYmowmhrTULKyMqow=\n"
   "-----END SIGNATURE-----\n";
 
-static const char test_md_16[] =
-  "onion-key\n"
-  "-----BEGIN RSA PUBLIC KEY-----\n"
-  "MIGJAoGBANBJz8Vldl12aFeSMPLiA4nOetLDN0oxU8bB1SDhO7Uu2zdWYVYAF5J0\n"
-  "st7WvrVy/jA9v/fsezNAPskBanecHRSkdMTpkcgRPMHE7CTGEwIy1Yp1X4bPgDlC\n"
-  "VCnbs5Pcts5HnWEYNK7qHDAUn+IlmjOO+pTUY8uyq+GQVz6H9wFlAgMBAAE=\n"
-  "-----END RSA PUBLIC KEY-----\n"
-  "ntor-onion-key Gg73xH7+kTfT6bi1uNVx9gwQdQas9pROIfmc4NpAdC4=\n"
-  "p reject 25,119,135-139,445,563,1214,4661-4666,6346-6429,6699,6881-6999\n";
-
 static const char test_md_18[] =
   "onion-key\n"
   "-----BEGIN RSA PUBLIC KEY-----\n"
@@ -436,15 +426,6 @@ test_md_generate(void *arg)
   ri = router_parse_entry_from_string(test_ri, NULL, 0, 0, NULL, NULL);
   tt_assert(ri);
 
-  /* XXXX test family lines. */
-  /* XXXX test method 14 for A lines. */
-  /* XXXX test method 15 for P6 lines. */
-
-  microdesc_free(md);
-  md = NULL;
-  md = dirvote_create_microdescriptor(ri, 16);
-  tt_str_op(md->body, OP_EQ, test_md_16);
-
   microdesc_free(md);
   md = NULL;
   md = dirvote_create_microdescriptor(ri, 18);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits