]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs-v3: Always generate the public key file on disk
authorcathugger <cathugger>
Tue, 3 Oct 2017 15:16:50 +0000 (11:16 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Tue, 3 Oct 2017 15:19:10 +0000 (11:19 -0400)
Fixes #23748

Signed-off-by: David Goulet <dgoulet@torproject.org>
changes/bug23748 [new file with mode: 0644]
src/or/hs_service.c

diff --git a/changes/bug23748 b/changes/bug23748
new file mode 100644 (file)
index 0000000..b7f42af
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (hidden service):
+    - Always make sure the hidden service generate the public key file if it
+      is missing. Prior to this, if the public key was deleted from disk, it
+      wouldn't get recreated. Fixes bug 23748; bugfix on 0.3.2.2-alpha.
index 5e575412b34c34c654d459ee752f57e78940de79..3d1945aa9585493aea73f3add56ec4e62448f17a 100644 (file)
@@ -981,7 +981,8 @@ load_service_keys(hs_service_t *service)
   fname = hs_path_from_filename(config->directory_path, fname_keyfile_prefix);
   /* Don't ask for key creation, we want to know if we were able to load it or
    * we had to generate it. Better logging! */
-  kp = ed_key_init_from_file(fname, 0, LOG_INFO, NULL, 0, 0, 0, NULL);
+  kp = ed_key_init_from_file(fname, INIT_ED_KEY_SPLIT, LOG_INFO, NULL, 0, 0,
+                             0, NULL);
   if (!kp) {
     log_info(LD_REND, "Unable to load keys from %s. Generating it...", fname);
     /* We'll now try to generate the keys and for it we want the strongest