Non-anonymous single-hop HS enabled tor doesn't detect already existing anonymous, HS at start-up
While trying to configure a toy non-anonymous single-hop onion service I ran into something that I believe is a bug.
The torrc
that I reused from an earlier experiment already contained a HS configuration entry created in anonymous mode. When I enabled HiddenServiceSingleHopMode
and HiddenServiceNonAnonymousMode
and started up tor
everything started up correctly and I was able to reach the configured HS service correctly. But when I sent the tor
process a SIGHUP
tor
exited with the following error:
Nov 11 17:40:06.000 [notice] Read configuration file "/Users/ahf/torrc".
Nov 11 17:40:06.000 [notice] HiddenServiceSingleHopMode is enabled; disabling UseEntryGuards.
Nov 11 17:40:06.000 [warn] We are configured with HiddenServiceNonAnonymousMode 1, but one or more hidden service keys were created in an anonymous mode. This is not allowed.
Nov 11 17:40:06.000 [err] Reading config failed--see warnings above. For usage, try -h.
Nov 11 17:40:06.000 [warn] Restart failed (config error?). Exiting.
Steps to reproduce:
- Create a anonymous HS in the
torrc
. - Start
tor
to make it create the keys for the HS. - Stop
tor
. - Enable
HiddenServiceSingleHopMode
andHiddenServiceNonAnonymousMode
- Start
tor
(which will start without problems). - Send
tor
aSIGHUP
which will cause it to exit with an error listed above.
I would expect tor
to exit when starting up and not when it's re-reading its configuration file.
I've been able to reproduce this with the 0.2.9.5-alpha Debian package and with Git HEAD (0980787f91cfc420
) on the master branch.