]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Check onion keys in microdescriptors, too
authorRobert Ransom <rransom.8774@gmail.com>
Thu, 28 Apr 2011 22:16:54 +0000 (15:16 -0700)
committerNick Mathewson <nickm@torproject.org>
Tue, 17 May 2011 23:39:00 +0000 (19:39 -0400)
changes/bug3207 [new file with mode: 0644]
src/or/routerparse.c

diff --git a/changes/bug3207 b/changes/bug3207
new file mode 100644 (file)
index 0000000..65a7dac
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Require that onion keys have exponent 65537 in microdescriptors too.
+      Fixes part of bug 3207; bugfix on 0.2.2.25-alpha
+
index be7a3fe8959257a9ba72148761d63e9f8360de13..57436f75e0a8a7c3d7b59e84f166b1d173598490 100644 (file)
@@ -4336,6 +4336,11 @@ microdescs_parse_from_string(const char *s, const char *eos,
     }
 
     tok = find_by_keyword(tokens, K_ONION_KEY);
+    if (!crypto_pk_check_key_public_exponent(tok->key)) {
+      log_warn(LD_DIR,
+               "Relay's onion key had invalid exponent.");
+      goto next;
+    }
     md->onion_pkey = tok->key;
     tok->key = NULL;