aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2023-10-05 08:16:57 -0400
committerNick Mathewson <nickm@torproject.org>2023-10-05 09:07:47 -0400
commit8ebb726d4d6b83e08a8fb3ac2ed97d54506c4b03 (patch)
tree3a3b8feea7af2a0cf0fcd22c387cf88a6a0bd8b7 /src
parenta2ab949a13106fcafe1caaa6699424e53255525a (diff)
downloadtor-8ebb726d4d6b83e08a8fb3ac2ed97d54506c4b03.tar.gz
tor-8ebb726d4d6b83e08a8fb3ac2ed97d54506c4b03.zip
Remove MIN_METHOD_FOR_UNPADDED_NTOR_KEY
Diffstat (limited to 'src')
-rw-r--r--src/feature/dirauth/dirvote.c6
-rw-r--r--src/feature/dirauth/dirvote.h4
2 files changed, 2 insertions, 8 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index fa919fbf48..682e2b19cd 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -3921,6 +3921,7 @@ dirvote_get_vote(const char *fp, int flags)
STATIC microdesc_t *
dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method)
{
+ (void) consensus_method; // Currently unneeded...
microdesc_t *result = NULL;
char *key = NULL, *summary = NULL, *family = NULL;
size_t keylen;
@@ -3939,8 +3940,7 @@ dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method)
if (ri->onion_curve25519_pkey) {
char kbuf[CURVE25519_BASE64_PADDED_LEN + 1];
- bool add_padding = (consensus_method < MIN_METHOD_FOR_UNPADDED_NTOR_KEY);
- curve25519_public_to_base64(kbuf, ri->onion_curve25519_pkey, add_padding);
+ curve25519_public_to_base64(kbuf, ri->onion_curve25519_pkey, false);
smartlist_add_asprintf(chunks, "ntor-onion-key %s\n", kbuf);
}
@@ -4046,8 +4046,6 @@ static const struct consensus_method_range_t {
int high;
} microdesc_consensus_methods[] = {
{MIN_SUPPORTED_CONSENSUS_METHOD,
- MIN_METHOD_FOR_UNPADDED_NTOR_KEY - 1},
- {MIN_METHOD_FOR_UNPADDED_NTOR_KEY,
MAX_SUPPORTED_CONSENSUS_METHOD},
{-1, -1}
};
diff --git a/src/feature/dirauth/dirvote.h b/src/feature/dirauth/dirvote.h
index 64afc2612c..b879990462 100644
--- a/src/feature/dirauth/dirvote.h
+++ b/src/feature/dirauth/dirvote.h
@@ -55,10 +55,6 @@
/** The highest consensus method that we currently support. */
#define MAX_SUPPORTED_CONSENSUS_METHOD 34
-/** Lowest consensus method where an unpadded base64 onion-key-ntor is allowed
- * See #7869 */
-#define MIN_METHOD_FOR_UNPADDED_NTOR_KEY 30
-
/** Lowest consensus method for which we use the correct algorithm for
* extracting the bwweightscale= and maxunmeasuredbw= parameters. See #19011.
*/