- Timestamp:
- 03/01/17 19:18:02 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/bletchley/ssltls.py
r120 r121 77 77 78 78 79 def ConnectSSLTLS(host, port, cipher_list=None, handshake_callback=None ):79 def ConnectSSLTLS(host, port, cipher_list=None, handshake_callback=None, verbose=True): 80 80 protocols = [("SSL 2/3", SSL.SSLv23_METHOD), 81 81 ("TLS 1.0", SSL.TLSv1_METHOD), … … 102 102 break 103 103 except ValueError as e: 104 sys.stderr.write("%s protocol not supported by your openssl library, trying others...\n" % pname) 104 if verbose: 105 sys.stderr.write("%s protocol not supported by your openssl library, trying others...\n" % pname) 105 106 except SSL.Error as e: 106 sys.stderr.write("Exception during %s handshake with server." % pname) 107 sys.stderr.write("\nThis could happen because the server requires " 108 "certain SSL/TLS versions or a client certificiate." 109 " Have no fear, we'll keep trying...\n") 107 if verbose: 108 sys.stderr.write("Exception during %s handshake with server." % pname) 109 sys.stderr.write("\nThis could happen because the server requires " 110 "certain SSL/TLS versions or a client certificiate." 111 " Have no fear, we'll keep trying...\n") 110 112 except Exception as e: 111 sys.stderr.write("Unknown exception during handshake with server: \n")113 sys.stderr.write("Unknown exception during %s handshake with server: \n" % pname) 112 114 traceback.print_exc(file=sys.stderr) 113 115
Note: See TracChangeset
for help on using the changeset viewer.