aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-09-14 11:57:19 -0400
committerNick Mathewson <nickm@torproject.org>2009-10-15 15:17:12 -0400
commit8b2f6b27fdc03f12d092d37c42d1995ff7426916 (patch)
treee43bd2156f445597940f0b9b386920811e7a38de /src/or/router.c
parent8d41e6c47126fb467858f98b06ab7460dcc6647b (diff)
downloadtor-8b2f6b27fdc03f12d092d37c42d1995ff7426916.tar.gz
tor-8b2f6b27fdc03f12d092d37c42d1995ff7426916.zip
Make signature-generation code handle different key and digest lengths.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 5b260de1ca..85abc8c5fb 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1788,7 +1788,7 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router,
note_crypto_pk_op(SIGN_RTR);
if (router_append_dirobj_signature(s+written,maxlen-written,
- digest,ident_key)<0) {
+ digest,DIGEST_LEN,ident_key)<0) {
log_warn(LD_BUG, "Couldn't sign router descriptor");
return -1;
}
@@ -1980,7 +1980,8 @@ extrainfo_dump_to_string(char *s, size_t maxlen, extrainfo_t *extrainfo,
len += strlen(s+len);
if (router_get_extrainfo_hash(s, digest)<0)
return -1;
- if (router_append_dirobj_signature(s+len, maxlen-len, digest, ident_key)<0)
+ if (router_append_dirobj_signature(s+len, maxlen-len, digest, DIGEST_LEN,
+ ident_key)<0)
return -1;
{