Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
d2e4262e
Unverified
Commit
d2e4262e
authored
Nov 06, 2019
by
teor
Browse files
Merge remote-tracking branch 'tor-github/pr/1340' into maint-0.3.5
parents
6bfdd096
2da4d64a
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/bug30916
0 → 100644
View file @
d2e4262e
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.
src/feature/relay/router.c
View file @
d2e4262e
...
...
@@ -278,19 +278,17 @@ construct_ntor_key_map(void)
{
di_digest256_map_t
*
m
=
NULL
;
if
(
!
tor_mem_is_zero
((
const
char
*
)
curve25519_onion_key
.
pubkey
.
public_key
,
CURVE25519_PUBKEY_LEN
))
{
dimap_add_entry
(
&
m
,
curve25519_onion_key
.
pubkey
.
public_key
,
const
uint8_t
*
cur_pk
=
curve25519_onion_key
.
pubkey
.
public_key
;
const
uint8_t
*
last_pk
=
last_
curve25519_onion_key
.
pubkey
.
public_key
;
if
(
!
tor_mem_is_zero
((
const
char
*
)
cur_pk
,
CURVE25519_PUBKEY_LEN
))
{
dimap_add_entry
(
&
m
,
cur_pk
,
tor_memdup
(
&
curve25519_onion_key
,
sizeof
(
curve25519_keypair_t
)));
}
if
(
!
tor_mem_is_zero
((
const
char
*
)
last_curve25519_onion_key
.
pubkey
.
public_key
,
CURVE25519_PUBKEY_LEN
))
{
dimap_add_entry
(
&
m
,
last_curve25519_onion_key
.
pubkey
.
public_key
,
if
(
!
tor_mem_is_zero
((
const
char
*
)
last_pk
,
CURVE25519_PUBKEY_LEN
)
&&
tor_memneq
(
cur_pk
,
last_pk
,
CURVE25519_PUBKEY_LEN
))
{
dimap_add_entry
(
&
m
,
last_pk
,
tor_memdup
(
&
last_curve25519_onion_key
,
sizeof
(
curve25519_keypair_t
)));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment