소스 검색

Merge branch 'maint-0.3.0'

Nick Mathewson 7 년 전
부모
커밋
9ab45d621c
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      src/or/routerkeys.c

+ 4 - 5
src/or/routerkeys.c

@@ -1001,12 +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) {
+    if (!server_mode(options)) {
+        /* No need to make an Ed25519->Link cert: we are a client */
+      return 0;
+    }
     log_warn(LD_OR, "Can't get my x509 link cert.");
     return -1;
   }