diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-05-17 19:47:22 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-05-17 19:47:22 -0400 |
commit | 3f49474349538be499ab485c697c147c8829fa0d (patch) | |
tree | 060784f765cd523151958a0c0ef34064f17ee407 /src/or/router.c | |
parent | d6a2fec05ebcc39773a2f6666e1378410c64f047 (diff) | |
parent | 00f74e0372a956f9db590e1cb2ddcfb265125023 (diff) | |
download | tor-3f49474349538be499ab485c697c147c8829fa0d.tar.gz tor-3f49474349538be499ab485c697c147c8829fa0d.zip |
Merge branch 'bug17150_027_extra' into maint-0.2.8
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/router.c b/src/or/router.c index d70756fdbf..cd8437d787 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -2037,6 +2037,7 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e) return -1; } ri->signing_key_cert = tor_cert_dup(get_master_signing_key_cert()); + ri->cache_info.signing_key_cert = tor_cert_dup(get_master_signing_key_cert()); get_platform_str(platform, sizeof(platform)); ri->platform = tor_strdup(platform); @@ -2129,6 +2130,8 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e) strlcpy(ei->nickname, get_options()->Nickname, sizeof(ei->nickname)); ei->cache_info.published_on = ri->cache_info.published_on; ei->signing_key_cert = tor_cert_dup(get_master_signing_key_cert()); + ei->cache_info.signing_key_cert = tor_cert_dup(get_master_signing_key_cert()); + memcpy(ei->cache_info.identity_digest, ri->cache_info.identity_digest, DIGEST_LEN); if (extrainfo_dump_to_string(&ei->cache_info.signed_descriptor_body, @@ -2154,7 +2157,7 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e) memcpy(ri->cache_info.extra_info_digest, ei->cache_info.signed_descriptor_digest, DIGEST_LEN); - memcpy(ri->extra_info_digest256, + memcpy(ri->cache_info.extra_info_digest256, ei->digest256, DIGEST256_LEN); } else { @@ -2195,7 +2198,8 @@ router_build_fresh_descriptor(routerinfo_t **r, extrainfo_t **e) ri->cache_info.signed_descriptor_digest); if (ei) { - tor_assert(! routerinfo_incompatible_with_extrainfo(ri, ei, NULL, NULL)); + tor_assert(! routerinfo_incompatible_with_extrainfo(ri->identity_pkey, ei, + &ri->cache_info, NULL)); } *r = ri; @@ -2669,9 +2673,9 @@ router_dump_router_to_string(routerinfo_t *router, char extra_info_digest[HEX_DIGEST_LEN+1]; base16_encode(extra_info_digest, sizeof(extra_info_digest), router->cache_info.extra_info_digest, DIGEST_LEN); - if (!tor_digest256_is_zero(router->extra_info_digest256)) { + if (!tor_digest256_is_zero(router->cache_info.extra_info_digest256)) { char d256_64[BASE64_DIGEST256_LEN+1]; - digest256_to_base64(d256_64, router->extra_info_digest256); + digest256_to_base64(d256_64, router->cache_info.extra_info_digest256); tor_asprintf(&extra_info_line, "extra-info-digest %s %s\n", extra_info_digest, d256_64); } else { |