Fix tor configuration parsing to avoid loading of secrets

This commit is contained in:
Christophe Mehay 2021-02-20 14:34:40 +01:00 committed by Christophe Mehay
parent 3434863f10
commit a37645543f
5 changed files with 408 additions and 410 deletions

View file

@ -113,10 +113,11 @@ class ServicesGroup(object):
with open(key_file, 'rb') as f:
self._onion.set_private_key_from_file(f)
def load_key(self, override=False):
def load_key(self, override=False, secret=True):
if self.imported_key and not override:
return
self.load_key_from_secrets()
if secret:
self.load_key_from_secrets()
self.load_key_from_conf()
def load_key_from_secrets(self):