URI: 
       tfix #4457 - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 5220451b7302fe98c2234ceaa08dbbc5040c8c94
   DIR parent 45b6afe190f5a9c8c143f5b6156673ecf9d6c2d4
  HTML Author: SomberNight <somber.night@protonmail.com>
       Date:   Fri, 22 Jun 2018 18:01:55 +0200
       
       fix #4457
       
       Diffstat:
         M lib/interface.py                    |      11 +++++++++--
       
       1 file changed, 9 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/lib/interface.py b/lib/interface.py
       t@@ -149,7 +149,11 @@ class TcpConnection(threading.Thread, util.PrintError):
                        except:
                            return
        
       -                if s and self.check_host_name(s.getpeercert(), self.host):
       +                try:
       +                    peer_cert = s.getpeercert()
       +                except OSError:
       +                    return
       +                if s and self.check_host_name(peer_cert, self.host):
                            self.print_error("SSL certificate signed by CA")
                            return s
                        # get server certificate.
       t@@ -166,7 +170,10 @@ class TcpConnection(threading.Thread, util.PrintError):
                        except:
                            return
        
       -                dercert = s.getpeercert(True)
       +                try:
       +                    dercert = s.getpeercert(True)
       +                except OSError:
       +                    return
                        s.close()
                        cert = ssl.DER_cert_to_PEM_cert(dercert)
                        # workaround android bug