Ignore "certificate Unknown" Alert
I have the following simple Python script: import socket import ssl if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind('', 443) s.
Solution 1:
Try catching the exception and ignoring it. It is supposed to be non-fatal.
sslconn = ssl.wrap_socket(conn, server_side=True, certfile="server.crt",
keyfile="server.key", cert_reqs=ssl.CERT_NONE,
do_handshake_on_connect=False)
try:
sslconn.do_handshake()
except ssl.SSLError, err:
if err.args[1].find("sslv3 alert") == -1:
raise
Post a Comment for "Ignore "certificate Unknown" Alert"