[tor-commits] [tor/release-0.4.6] Merge branch 'maint-0.3.5' into maint-0.4.5

ahf at torproject.org ahf at torproject.org
Wed Oct 20 21:48:55 UTC 2021


commit 5717b88bcb88d374b7b934622f0b7bf62cdab05c
Merge: fdc7549b61 7372739765
Author: Alexander Færøy <ahf at torproject.org>
Date:   Wed Oct 20 21:47:17 2021 +0000

    Merge branch 'maint-0.3.5' into maint-0.4.5

 changes/ticket30477        |  4 ++++
 src/feature/relay/router.c | 23 +++++++++++++++++++++++
 src/feature/relay/router.h |  1 +
 3 files changed, 28 insertions(+)

diff --cc src/feature/relay/router.c
index 2696b8633b,7ea2a4e719..0589786619
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@@ -1140,11 -1121,11 +1159,15 @@@ init_keys(void
      log_err(LD_FS, "Error writing hashed fingerprint to file");
      return -1;
    }
 +  if (router_write_fingerprint(0, 1)) {
 +    log_err(LD_FS, "Error writing ed25519 identity to file");
 +    return -1;
 +  }
  
+   /* Display URL to bridge status page. */
+   if (! public_server_mode(options))
+     router_announce_bridge_status_page();
+ 
    if (!authdir_mode(options))
      return 0;
    /* 6. [authdirserver only] load approved-routers file */
diff --cc src/feature/relay/router.h
index aa03c27142,2d9ff3f8f3..9556a66e68
--- a/src/feature/relay/router.h
+++ b/src/feature/relay/router.h
@@@ -125,29 -115,11 +125,30 @@@ void router_reset_warnings(void)
  void router_free_all(void);
  
  #ifdef ROUTER_PRIVATE
 -/* Used only by router.c and test.c */
 +/* Used only by router.c and the unit tests */
  STATIC void get_platform_str(char *platform, size_t len);
 -STATIC int router_write_fingerprint(int hashed);
 +STATIC int router_write_fingerprint(int hashed, int ed25519_identity);
 +STATIC smartlist_t *get_my_declared_family(const or_options_t *options);
+ STATIC void router_announce_bridge_status_page(void);
 -#endif
 +STATIC int load_stats_file(const char *filename, const char *ts_tag,
 +                           time_t now, char **out);
 +
 +#ifdef TOR_UNIT_TESTS
 +extern time_t desc_clean_since;
 +extern const char *desc_dirty_reason;
 +void set_server_identity_key_digest_testing(const uint8_t *digest);
 +MOCK_DECL(STATIC const struct curve25519_keypair_t *,
 +                                       get_current_curve25519_keypair,(void));
 +
 +MOCK_DECL(STATIC int,
 +              router_build_fresh_unsigned_routerinfo,(routerinfo_t **ri_out));
 +STATIC extrainfo_t *router_build_fresh_signed_extrainfo(
 +                                                      const routerinfo_t *ri);
 +STATIC void router_update_routerinfo_from_extrainfo(routerinfo_t *ri,
 +                                                    const extrainfo_t *ei);
 +STATIC int router_dump_and_sign_routerinfo_descriptor_body(routerinfo_t *ri);
 +#endif /* defined(TOR_UNIT_TESTS) */
 +
 +#endif /* defined(ROUTER_PRIVATE) */
  
  #endif /* !defined(TOR_ROUTER_H) */





More information about the tor-commits mailing list