diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-06-01 11:07:08 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-06-01 11:07:17 -0400 |
commit | 0fd3ad75daf925e8192aa1d44b229b3b7c29829d (patch) | |
tree | 44eb4c18f6827bbb27abf6addba09544b2c55f51 /src/or/routerparse.c | |
parent | 56771f392e68eb2f78180daab0d8f17c9284ad11 (diff) | |
download | tor-0fd3ad75daf925e8192aa1d44b229b3b7c29829d.tar.gz tor-0fd3ad75daf925e8192aa1d44b229b3b7c29829d.zip |
Report wrong key sizes correctly
When we introduced NEED_KEY_1024 in routerparse.c back in
0.2.0.1-alpha, I forgot to add a *8 when logging the length of a
bad-length key.
Bugfix for 3318 on 0.2.0.1-alpha.
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 1dcbc6a184..3728e9932b 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -3767,7 +3767,7 @@ token_check_object(memarea_t *area, const char *kwd, case NEED_SKEY_1024: /* There must be a 1024-bit private key. */ if (tok->key && crypto_pk_keysize(tok->key) != PK_BYTES) { tor_snprintf(ebuf, sizeof(ebuf), "Wrong size on key for %s: %d bits", - kwd, (int)crypto_pk_keysize(tok->key)); + kwd, (int)crypto_pk_keysize(tok->key)*8); RET_ERR(ebuf); } /* fall through */ |