mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
handle handshake failures in SSL
This commit is contained in:
parent
7a5016ec42
commit
77dd1ae1b1
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue