summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-19 15:56:39 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-19 15:56:39 -0400
commit4a14c2cfc7972db39da4fd3a72cfd64d036daf7b (patch)
treedf7812c9ea3ea51bb66ab93fa7fc10a593cf020c /src/or/routerparse.c
parenta7a44f2db0b6732ed53a24186dc09eea50296a20 (diff)
parent0d6f293e0e5ca7ae57347d8879a6ba7805a2cac3 (diff)
downloadtor-4a14c2cfc7972db39da4fd3a72cfd64d036daf7b.tar.gz
tor-4a14c2cfc7972db39da4fd3a72cfd64d036daf7b.zip
Merge branch 'maint-0.2.8'
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index f94809a9fc..95c241d10d 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -1,4 +1,4 @@
- /* Copyright (c) 2001 Matej Pfajfar.
+/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2016, The Tor Project, Inc. */
@@ -1405,8 +1405,8 @@ router_parse_entry_from_string(const char *s, const char *end,
log_warn(LD_DIR, "Couldn't parse ed25519 cert");
goto err;
}
- router->signing_key_cert = cert; /* makes sure it gets freed. */
- router->cache_info.signing_key_cert = tor_cert_dup(cert);
+ /* makes sure it gets freed. */
+ router->cache_info.signing_key_cert = cert;
if (cert->cert_type != CERT_TYPE_ID_SIGNING ||
! cert->signing_key_included) {
@@ -1601,8 +1601,8 @@ router_parse_entry_from_string(const char *s, const char *end,
}
if (tok->n_args >= 2) {
- if (digest256_from_base64(router->cache_info.extra_info_digest256, tok->args[1])
- < 0) {
+ if (digest256_from_base64(router->cache_info.extra_info_digest256,
+ tok->args[1]) < 0) {
log_warn(LD_DIR, "Invalid extra info digest256 %s",
escaped(tok->args[1]));
}
@@ -1787,8 +1787,9 @@ extrainfo_parse_entry_from_string(const char *s, const char *end,
log_warn(LD_DIR, "Couldn't parse ed25519 cert");
goto err;
}
- extrainfo->signing_key_cert = cert; /* makes sure it gets freed. */
- extrainfo->cache_info.signing_key_cert = tor_cert_dup(cert);
+ /* makes sure it gets freed. */
+ extrainfo->cache_info.signing_key_cert = cert;
+
if (cert->cert_type != CERT_TYPE_ID_SIGNING ||
! cert->signing_key_included) {
log_warn(LD_DIR, "Invalid form for ed25519 cert");