aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-06-03 11:34:32 -0400
committerNick Mathewson <nickm@torproject.org>2011-06-03 11:34:32 -0400
commit7aa20b20bffcbc4c9b4e3eb1c874616e1cab119f (patch)
treedf99f8fe91e4503ae70aaa178cbf29182916d87e /src/or
parentde069f5ea73a4fe841df27d85c28c0d79ad2c13e (diff)
parentbbf2fee8ff7bbb8f645b7d973cd84bc97e93ae54 (diff)
downloadtor-7aa20b20bffcbc4c9b4e3eb1c874616e1cab119f.tar.gz
tor-7aa20b20bffcbc4c9b4e3eb1c874616e1cab119f.zip
Merge branch 'bug3318c' into maint-0.2.2
Diffstat (limited to 'src/or')
-rw-r--r--src/or/routerparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 3728e9932b..f855f9d027 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -3765,9 +3765,9 @@ token_check_object(memarea_t *area, const char *kwd,
break;
case NEED_KEY_1024: /* There must be a 1024-bit public key. */
case NEED_SKEY_1024: /* There must be a 1024-bit private key. */
- if (tok->key && crypto_pk_keysize(tok->key) != PK_BYTES) {
+ if (tok->key && crypto_pk_num_bits(tok->key) != PK_BYTES*8) {
tor_snprintf(ebuf, sizeof(ebuf), "Wrong size on key for %s: %d bits",
- kwd, (int)crypto_pk_keysize(tok->key)*8);
+ kwd, crypto_pk_num_bits(tok->key));
RET_ERR(ebuf);
}
/* fall through */