Skip to content

Commit

Permalink
#1836: assume AES is always available rather than initializing python…
Browse files Browse the repository at this point in the history
…-cryptography every time (which brings in openssl and other bits)

git-svn-id: https://xpra.org/svn/Xpra/trunk@19285 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 12, 2018
1 parent ea5a9b4 commit d652093
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/xpra/client/gtk_base/client_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
from xpra.client.gtk_base.gtk_tray_menu_base import make_min_auto_menu, make_encodingsmenu, \
MIN_QUALITY_OPTIONS, QUALITY_OPTIONS, MIN_SPEED_OPTIONS, SPEED_OPTIONS
from xpra.gtk_common.about import about
from xpra.net.crypto import ENCRYPTION_CIPHERS, crypto_backend_init
from xpra.scripts.main import connect_to, make_client, configure_network, is_local
from xpra.platform.paths import get_icon_dir
from xpra.platform import get_username
Expand Down Expand Up @@ -130,13 +129,12 @@ def get_connection_modes(self):
modes.append("ssl")
except:
pass
if "AES" in ENCRYPTION_CIPHERS:
modes.append("tcp + aes")
#assume crypto is available
modes.append("tcp + aes")
modes.append("tcp")
return modes

def get_launcher_validation(self):
crypto_backend_init()
#TODO: since "mode" is not part of global options
#this validation should be injected from the launcher instead
def validate_in_list(x, options):
Expand Down Expand Up @@ -766,7 +764,7 @@ def pint(v):
mode_enc = self.mode_combo.get_active_text().upper()
if mode_enc.startswith("TCP"):
self.config.mode = "tcp"
if mode_enc.find("AES")>0 and "AES" in ENCRYPTION_CIPHERS:
if mode_enc.find("AES")>0:
self.config.encryption = "AES"
elif mode_enc=="SSL":
self.config.mode = "ssl"
Expand Down

0 comments on commit d652093

Please sign in to comment.