mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-25 10:42:58 -03:00
only set self.private_key after the Onion service has started, if we received a new one
This commit is contained in:
parent
7edd693071
commit
bec03bb10e
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue