[tor-commits] [tor/master] Move AuthDirTestEd25519LinkKeys to the dirauth module.
nickm at torproject.org
nickm at torproject.org
Fri Jan 17 13:37:45 UTC 2020
commit b1d029b9a13ffd3cc69bbbebf8d7d2b381751a59
Author: Nick Mathewson <nickm at torproject.org>
Date: Thu Dec 19 09:38:25 2019 -0500
Move AuthDirTestEd25519LinkKeys to the dirauth module.
---
src/app/config/config.c | 1 -
src/app/config/or_options_st.h | 5 -----
src/feature/dirauth/dirauth_options.inc | 5 +++++
src/feature/dirauth/reachability.c | 6 +++---
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 5ce5174da..06a0110e4 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -679,7 +679,6 @@ static const config_var_t option_vars_[] = {
OBSOLETE("UseNTorHandshake"),
V_IMMUTABLE(User, STRING, NULL),
OBSOLETE("UserspaceIOCPBuffers"),
- V(AuthDirTestEd25519LinkKeys, BOOL, "1"),
OBSOLETE("V1AuthoritativeDirectory"),
OBSOLETE("V2AuthoritativeDirectory"),
VAR("V3AuthoritativeDirectory",BOOL, V3AuthoritativeDir, "0"),
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index dc36c4056..46c709622 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -986,11 +986,6 @@ struct or_options_t {
* If -1, we should do whatever the consensus parameter says. */
int ExtendByEd25519ID;
- /** Bool (default: 1): When testing routerinfos as a directory authority,
- * do we enforce Ed25519 identity match? */
- /* NOTE: remove this option someday. */
- int AuthDirTestEd25519LinkKeys;
-
/** Bool (default: 0): Tells if a %include was used on torrc */
int IncludeUsed;
diff --git a/src/feature/dirauth/dirauth_options.inc b/src/feature/dirauth/dirauth_options.inc
index ec4d997f9..ca70a51b9 100644
--- a/src/feature/dirauth/dirauth_options.inc
+++ b/src/feature/dirauth/dirauth_options.inc
@@ -39,6 +39,11 @@ CONF_VAR(AuthDirPinKeys, BOOL, 0, "1")
* vote indicating participation. */
CONF_VAR(AuthDirSharedRandomness, BOOL, 0, "1")
+/** Bool (default: 1): When testing routerinfos as a directory authority,
+ * do we enforce Ed25519 identity match? */
+/* NOTE: remove this option someday. */
+CONF_VAR(AuthDirTestEd25519LinkKeys, BOOL, 0, "1")
+
/** Which versions of tor should we tell users to run? */
CONF_VAR(RecommendedVersions, LINELIST, 0, NULL)
diff --git a/src/feature/dirauth/reachability.c b/src/feature/dirauth/reachability.c
index 2f883d503..27aa661f8 100644
--- a/src/feature/dirauth/reachability.c
+++ b/src/feature/dirauth/reachability.c
@@ -55,7 +55,7 @@ dirserv_orconn_tls_done(const tor_addr_t *addr,
ri = node->ri;
- if (get_options()->AuthDirTestEd25519LinkKeys &&
+ if (dirauth_get_options()->AuthDirTestEd25519LinkKeys &&
node_supports_ed25519_link_authentication(node, 1) &&
ri->cache_info.signing_key_cert) {
/* We allow the node to have an ed25519 key if we haven't been told one in
@@ -127,7 +127,7 @@ dirserv_should_launch_reachability_test(const routerinfo_t *ri,
void
dirserv_single_reachability_test(time_t now, routerinfo_t *router)
{
- const or_options_t *options = get_options();
+ const dirauth_options_t *dirauth_options = dirauth_get_options();
channel_t *chan = NULL;
const node_t *node = NULL;
tor_addr_t router_addr;
@@ -138,7 +138,7 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router)
node = node_get_by_id(router->cache_info.identity_digest);
tor_assert(node);
- if (options->AuthDirTestEd25519LinkKeys &&
+ if (dirauth_options->AuthDirTestEd25519LinkKeys &&
node_supports_ed25519_link_authentication(node, 1) &&
router->cache_info.signing_key_cert) {
ed_id_key = &router->cache_info.signing_key_cert->signing_key;
More information about the tor-commits
mailing list