tMerge pull request #1381 from EagleTM/master - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 58d131d7dd5ad78d55384edad6434a43ce1f16da (DIR) parent 77b0e7be5e35ce37f55d3035f57c8b81cd23c0ce (HTM) Author: ThomasV <electrumdev@gmail.com> Date: Fri, 31 Jul 2015 12:43:05 +0200 Merge pull request #1381 from EagleTM/master Use ssl.PROTOCOL_TLSv1 on client side to avoid SSLv23 Diffstat: M lib/interface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- (DIR) diff --git a/lib/interface.py b/lib/interface.py t@@ -148,7 +148,7 @@ class TcpInterface(threading.Thread): return # try with CA first try: - s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_SSLv23, cert_reqs=ssl.CERT_REQUIRED, ca_certs=ca_path, do_handshake_on_connect=True) + s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1, cert_reqs=ssl.CERT_REQUIRED, ca_certs=ca_path, do_handshake_on_connect=True) except ssl.SSLError, e: s = None if s and check_host_name(s.getpeercert(), self.host): t@@ -161,7 +161,7 @@ class TcpInterface(threading.Thread): if s is None: return try: - s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_SSLv23, cert_reqs=ssl.CERT_NONE, ca_certs=None) + s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1, cert_reqs=ssl.CERT_NONE, ca_certs=None) except ssl.SSLError, e: self.print_error("SSL error retrieving SSL certificate:", e) return t@@ -184,7 +184,7 @@ class TcpInterface(threading.Thread): if self.use_ssl: try: s = ssl.wrap_socket(s, - ssl_version=ssl.PROTOCOL_SSLv23, + ssl_version=ssl.PROTOCOL_TLSv1, cert_reqs=ssl.CERT_REQUIRED, ca_certs= (temporary_path if is_new else cert_path), do_handshake_on_connect=True)