mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
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.
This commit is contained in:
parent
56771f392e
commit
0fd3ad75da
3
changes/bug3318
Normal file
3
changes/bug3318
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes:
|
||||
- Fix a log message that said "bits" while displaying a value in
|
||||
bytes. Fixes bug 3318; bugfix on 0.2.0.1-alpha.
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user