mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge branch 'bug30916_035' into bug30916_041
This commit is contained in:
commit
4bbefc2aac
4
changes/bug30916
Normal file
4
changes/bug30916
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes (relay):
|
||||||
|
- Avoid crashing when starting with a corrupt keys directory where
|
||||||
|
the old ntor key and the new ntor key are identical. Fixes bug 30916;
|
||||||
|
bugfix on 0.2.4.8-alpha.
|
@ -284,19 +284,17 @@ construct_ntor_key_map(void)
|
|||||||
{
|
{
|
||||||
di_digest256_map_t *m = NULL;
|
di_digest256_map_t *m = NULL;
|
||||||
|
|
||||||
if (!fast_mem_is_zero((const char*)
|
const uint8_t *cur_pk = curve25519_onion_key.pubkey.public_key;
|
||||||
curve25519_onion_key.pubkey.public_key,
|
const uint8_t *last_pk = last_curve25519_onion_key.pubkey.public_key;
|
||||||
CURVE25519_PUBKEY_LEN)) {
|
|
||||||
dimap_add_entry(&m,
|
if (!fast_mem_is_zero((const char *)cur_pk, CURVE25519_PUBKEY_LEN)) {
|
||||||
curve25519_onion_key.pubkey.public_key,
|
dimap_add_entry(&m, cur_pk,
|
||||||
tor_memdup(&curve25519_onion_key,
|
tor_memdup(&curve25519_onion_key,
|
||||||
sizeof(curve25519_keypair_t)));
|
sizeof(curve25519_keypair_t)));
|
||||||
}
|
}
|
||||||
if (!fast_mem_is_zero((const char*)
|
if (!fast_mem_is_zero((const char*)last_pk, CURVE25519_PUBKEY_LEN) &&
|
||||||
last_curve25519_onion_key.pubkey.public_key,
|
tor_memneq(cur_pk, last_pk, CURVE25519_PUBKEY_LEN)) {
|
||||||
CURVE25519_PUBKEY_LEN)) {
|
dimap_add_entry(&m, last_pk,
|
||||||
dimap_add_entry(&m,
|
|
||||||
last_curve25519_onion_key.pubkey.public_key,
|
|
||||||
tor_memdup(&last_curve25519_onion_key,
|
tor_memdup(&last_curve25519_onion_key,
|
||||||
sizeof(curve25519_keypair_t)));
|
sizeof(curve25519_keypair_t)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user