diff --git a/onionshare/onion.py b/onionshare/onion.py index 409c9ad8..862266e7 100644 --- a/onionshare/onion.py +++ b/onionshare/onion.py @@ -425,6 +425,8 @@ class Onion(object): # A new private key was generated and is in the Control port response. if not self.settings.get('private_key'): self.private_key = res.private_key + else: + self.private_key = '' if self.stealth: # Similar to the PrivateKey, the Control port only returns the ClientAuth diff --git a/onionshare/onionshare.py b/onionshare/onionshare.py index 7466a163..ff5f33fb 100644 --- a/onionshare/onionshare.py +++ b/onionshare/onionshare.py @@ -78,7 +78,8 @@ class OnionShare(object): self.onion_host = self.onion.start_onion_service(self.port) - self.private_key = self.onion.private_key + if self.onion.private_key: + self.private_key = self.onion.private_key if self.stealth: self.auth_string = self.onion.auth_string