electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 77dd1ae1b18d5c249e2c90b7678cf4befe5c542b
parent 7a5016ec4285eeea063db3afbc48b610c75894fb
Author: ThomasV <thomasv@gitorious>
Date:   Thu,  3 Oct 2013 10:27:39 +0200

handle handshake failures in SSL

Diffstat:
Mlib/interface.py | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/interface.py b/lib/interface.py @@ -319,7 +319,11 @@ class Interface(threading.Thread): # print_error("failed to connect", self.host, self.port) return - s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_SSLv3, cert_reqs=ssl.CERT_NONE, ca_certs=None) + try: + s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_SSLv3, cert_reqs=ssl.CERT_NONE, ca_certs=None) + except ssl.SSLError, e: + print_error("SSL error:", self.host, e) + return dercert = s.getpeercert(True) s.close() cert = ssl.DER_cert_to_PEM_cert(dercert)