diff options
author | teor <teor2345@gmail.com> | 2017-12-24 19:47:42 +1100 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2017-12-24 19:50:47 +1100 |
commit | 53f350182e60b32791b23ea98368a41037bffd0d (patch) | |
tree | f57a1da4b17543ddbc588814d7a9b5f50f273f91 /src | |
parent | 5865e56ec083bbccd46bf71a9343b3744f0c4ecc (diff) | |
download | tor-53f350182e60b32791b23ea98368a41037bffd0d.tar.gz tor-53f350182e60b32791b23ea98368a41037bffd0d.zip |
Expand comments in node_get_ed25519_id() and put them near the relevant code
And add a changes file.
Follow-up to 24001.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/nodelist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 042074998b..4eafe6d7a7 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -908,18 +908,22 @@ node_get_ed25519_id(const node_t *node) { const ed25519_public_key_t *ri_pk = NULL; const ed25519_public_key_t *md_pk = NULL; + if (node->ri) { if (node->ri->cache_info.signing_key_cert) { ri_pk = &node->ri->cache_info.signing_key_cert->signing_key; + /* Checking whether routerinfo ed25519 is all zero. + * Our descriptor parser should make sure this never happens. */ if (BUG(ed25519_public_key_is_zero(ri_pk))) ri_pk = NULL; } } -/* Checking whether microdesc_ed25519() is all zero*/ if (node->md) { if (node->md->ed25519_identity_pkey) { md_pk = node->md->ed25519_identity_pkey; + /* Checking whether microdesc ed25519 is all zero. + * Our descriptor parser should make sure this never happens. */ if (BUG(ed25519_public_key_is_zero(md_pk))) md_pk = NULL; } |