mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-07 06:13:03 -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
de36fea474
commit
d5140be046
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.
|
# 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,6 +78,7 @@ class OnionShare(object):
|
||||||
|
|
||||||
self.onion_host = self.onion.start_onion_service(self.port)
|
self.onion_host = self.onion.start_onion_service(self.port)
|
||||||
|
|
||||||
|
if self.onion.private_key:
|
||||||
self.private_key = self.onion.private_key
|
self.private_key = self.onion.private_key
|
||||||
|
|
||||||
if self.stealth:
|
if self.stealth:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue