Remove MIN_METHOD_FOR_ID_HASH_IN_MD and a test for running without it.

This commit is contained in:
Nick Mathewson 2018-04-09 14:54:46 -04:00
parent 93380db833
commit caf766991d
3 changed files with 1 additions and 24 deletions

View File

@ -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 &&

View File

@ -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

View File

@ -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);