aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-02-23 12:42:10 -0500
committerNick Mathewson <nickm@torproject.org>2016-02-23 12:42:10 -0500
commit94c8f3605f39a8a9058e7c0222386f3dd8dbfa7c (patch)
tree2883a4156a41dfaa79d6229899701e15ca8982b8 /src/or/dirvote.c
parent31c7a65d894c144647a2364bcad337ee5ae020ff (diff)
downloadtor-94c8f3605f39a8a9058e7c0222386f3dd8dbfa7c.tar.gz
tor-94c8f3605f39a8a9058e7c0222386f3dd8dbfa7c.zip
Replace two instances of N_DIGEST_ALGORITHMS.
These should have been N_COMMON_DIGEST_ALGORITHMS. Fixes bug 18380; bug not in any released Tor.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index 80e4c330ce..a81d1a96b1 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -2121,7 +2121,7 @@ networkstatus_add_detached_signatures(networkstatus_t *target,
*msg_out = "No digests for given consensus flavor";
return -1;
}
- for (alg = DIGEST_SHA1; alg < N_DIGEST_ALGORITHMS; ++alg) {
+ for (alg = DIGEST_SHA1; alg < N_COMMON_DIGEST_ALGORITHMS; ++alg) {
if (!tor_mem_is_zero(digests->d[alg], DIGEST256_LEN)) {
if (fast_memeq(target->digests.d[alg], digests->d[alg],
DIGEST256_LEN)) {
@@ -2314,7 +2314,7 @@ networkstatus_get_detached_signatures(smartlist_t *consensuses)
/* start with SHA256; we don't include SHA1 for anything but the basic
* consensus. */
- for (alg = DIGEST_SHA256; alg < N_DIGEST_ALGORITHMS; ++alg) {
+ for (alg = DIGEST_SHA256; alg < N_COMMON_DIGEST_ALGORITHMS; ++alg) {
char d[HEX_DIGEST256_LEN+1];
const char *alg_name =
crypto_digest_algorithm_get_name(alg);