SomberNight 7 years ago
parent
commit
5220451b73
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 11
      lib/interface.py

11
lib/interface.py

@ -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.
@ -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

Loading…
Cancel
Save