mirror of
https://github.com/onionshare/onionshare.git
synced 2025-03-14 01:46:28 -04:00
Gracefully avoid sending the client_auth_v3 argument to Stem's create_ephemeral_hidden_service() if the version of Stem we're on does not yet support it
This commit is contained in:
parent
80cc1f43e8
commit
e4465435fa
@ -663,14 +663,23 @@ class Onion(object):
|
||||
client_auth_v3_pub_key = None
|
||||
|
||||
try:
|
||||
res = self.c.create_ephemeral_hidden_service(
|
||||
{80: port},
|
||||
await_publication=await_publication,
|
||||
basic_auth=None,
|
||||
key_type=key_type,
|
||||
key_content=key_content,
|
||||
client_auth_v3=client_auth_v3_pub_key,
|
||||
)
|
||||
if not self.supports_stealth:
|
||||
res = self.c.create_ephemeral_hidden_service(
|
||||
{80: port},
|
||||
await_publication=await_publication,
|
||||
basic_auth=None,
|
||||
key_type=key_type,
|
||||
key_content=key_content,
|
||||
)
|
||||
else:
|
||||
res = self.c.create_ephemeral_hidden_service(
|
||||
{80: port},
|
||||
await_publication=await_publication,
|
||||
basic_auth=None,
|
||||
key_type=key_type,
|
||||
key_content=key_content,
|
||||
client_auth_v3=client_auth_v3_pub_key,
|
||||
)
|
||||
|
||||
except ProtocolError as e:
|
||||
print("Tor error: {}".format(e.args[0]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user