mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Remove MIN_METHOD_FOR_ID_HASH_IN_MD and a test for running without it.
This commit is contained in:
parent
93380db833
commit
caf766991d
@ -3862,7 +3862,7 @@ dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method)
|
|||||||
tor_free(p6);
|
tor_free(p6);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (consensus_method >= MIN_METHOD_FOR_ID_HASH_IN_MD) {
|
{
|
||||||
char idbuf[ED25519_BASE64_LEN+1];
|
char idbuf[ED25519_BASE64_LEN+1];
|
||||||
const char *keytype;
|
const char *keytype;
|
||||||
if (consensus_method >= MIN_METHOD_FOR_ED25519_ID_IN_MD &&
|
if (consensus_method >= MIN_METHOD_FOR_ED25519_ID_IN_MD &&
|
||||||
|
@ -61,10 +61,6 @@
|
|||||||
/** The highest consensus method that we currently support. */
|
/** The highest consensus method that we currently support. */
|
||||||
#define MAX_SUPPORTED_CONSENSUS_METHOD 28
|
#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*/
|
/** Lowest consensus method where we include "package" lines*/
|
||||||
#define MIN_METHOD_FOR_PACKAGE_LINES 19
|
#define MIN_METHOD_FOR_PACKAGE_LINES 19
|
||||||
|
|
||||||
|
@ -385,16 +385,6 @@ static const char test_ri2[] =
|
|||||||
"cf34GXHv61XReJF3AlzNHFpbrPOYmowmhrTULKyMqow=\n"
|
"cf34GXHv61XReJF3AlzNHFpbrPOYmowmhrTULKyMqow=\n"
|
||||||
"-----END SIGNATURE-----\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[] =
|
static const char test_md_18[] =
|
||||||
"onion-key\n"
|
"onion-key\n"
|
||||||
"-----BEGIN RSA PUBLIC 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);
|
ri = router_parse_entry_from_string(test_ri, NULL, 0, 0, NULL, NULL);
|
||||||
tt_assert(ri);
|
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);
|
microdesc_free(md);
|
||||||
md = NULL;
|
md = NULL;
|
||||||
md = dirvote_create_microdescriptor(ri, 18);
|
md = dirvote_create_microdescriptor(ri, 18);
|
||||||
|
Loading…
Reference in New Issue
Block a user