mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04: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
@ -425,6 +425,8 @@ class Onion(object):
|
|||||||
# A new private key was generated and is in the Control port response.
|
# A new private key was generated and is in the Control port response.
|
||||||
if not self.settings.get('private_key'):
|
if not self.settings.get('private_key'):
|
||||||
self.private_key = res.private_key
|
self.private_key = res.private_key
|
||||||
|
else:
|
||||||
|
self.private_key = ''
|
||||||
|
|
||||||
if self.stealth:
|
if self.stealth:
|
||||||
# Similar to the PrivateKey, the Control port only returns the ClientAuth
|
# 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.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:
|
if self.stealth:
|
||||||
self.auth_string = self.onion.auth_string
|
self.auth_string = self.onion.auth_string
|
||||||
|
Loading…
Reference in New Issue
Block a user