mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-29 16:31:29 +00:00
fix #4457
This commit is contained in:
parent
45b6afe190
commit
5220451b73
1 changed files with 9 additions and 2 deletions
|
@ -149,7 +149,11 @@ class TcpConnection(threading.Thread, util.PrintError):
|
||||||
except:
|
except:
|
||||||
return
|
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")
|
self.print_error("SSL certificate signed by CA")
|
||||||
return s
|
return s
|
||||||
# get server certificate.
|
# get server certificate.
|
||||||
|
@ -166,7 +170,10 @@ class TcpConnection(threading.Thread, util.PrintError):
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
|
|
||||||
dercert = s.getpeercert(True)
|
try:
|
||||||
|
dercert = s.getpeercert(True)
|
||||||
|
except OSError:
|
||||||
|
return
|
||||||
s.close()
|
s.close()
|
||||||
cert = ssl.DER_cert_to_PEM_cert(dercert)
|
cert = ssl.DER_cert_to_PEM_cert(dercert)
|
||||||
# workaround android bug
|
# workaround android bug
|
||||||
|
|
Loading…
Add table
Reference in a new issue