summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-06-06 09:32:45 -0400
committerNick Mathewson <nickm@torproject.org>2017-06-06 09:32:45 -0400
commit14ffcc003d5e8fd383598e34183938fcec51a901 (patch)
tree4b8debedb24d3eb661b90011649149d8b6757de1
parent5343d2b03c8158fcd9c8811e367e26ac6bfa9827 (diff)
parent4ed0f0d62f760f83d9d87f37b88104b11c44fb6a (diff)
downloadtor-14ffcc003d5e8fd383598e34183938fcec51a901.tar.gz
tor-14ffcc003d5e8fd383598e34183938fcec51a901.zip
Merge branch 'maint-0.3.0'
-rw-r--r--src/or/routerkeys.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c
index 5ab369b671..d8242b010c 100644
--- a/src/or/routerkeys.c
+++ b/src/or/routerkeys.c
@@ -992,7 +992,7 @@ load_ed_keys(const or_options_t *options, time_t now)
*
* Returns -1 upon error. Otherwise, returns 0 upon success (either when the
* current certificate is still valid, or when a new certificate was
- * successfully generated).
+ * successfully generated, or no certificate was needed).
*/
int
generate_ed_link_cert(const or_options_t *options, time_t now,
@@ -1001,6 +1001,11 @@ generate_ed_link_cert(const or_options_t *options, time_t now,
const tor_x509_cert_t *link_ = NULL, *id = NULL;
tor_cert_t *link_cert = NULL;
+ if (!server_mode(options)) {
+ /* No need to make an Ed25519->Link cert: we are a client */
+ return 0;
+ }
+
if (tor_tls_get_my_certs(1, &link_, &id) < 0 || link_ == NULL) {
log_warn(LD_OR, "Can't get my x509 link cert.");
return -1;