Skip to content

Commit

Permalink
#1478: connect the socket before trying to wrap it with ssl!
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@15473 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 31, 2017
1 parent 4e29efe commit 88713f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1799,11 +1799,12 @@ def sockpathfail_cb(msg):
strict_host_check = display_desc.get("strict-host-check")
if strict_host_check is False:
opts.ssl_server_verify_mode = "none"
tcp_endpoint = (display_desc["host"], display_desc["port"])
conn = _socket_connect(sock, tcp_endpoint, display_name, dtype)
if dtype in ("ssl", "wss"):
wrap_socket = ssl_wrap_socket_fn(opts, server_side=False)
sock = wrap_socket(sock)
tcp_endpoint = (display_desc["host"], display_desc["port"])
conn = _socket_connect(sock, tcp_endpoint, display_name, dtype)
conn._socket = sock
conn.timeout = SOCKET_TIMEOUT

#wrap in a websocket:
Expand Down

0 comments on commit 88713f6

Please sign in to comment.