From: Ralf Jung Date: Mon, 21 Jul 2014 09:08:54 +0000 (+0200) Subject: Add option to use STARTTLS X-Git-Url: https://git.ralfj.de/tls-check.git/commitdiff_plain/f62947bdba33b8bb9d99bbf0654e7e72fe6dfeba?ds=inline Add option to use STARTTLS --- diff --git a/ssl-check b/ssl-check index 3b8a4d0..63d156a 100755 --- a/ssl-check +++ b/ssl-check @@ -78,6 +78,8 @@ def test_host(host, port, options=[]): if __name__ == "__main__": parser = argparse.ArgumentParser(description='Check SSL ciphers supported by a host') + parser.add_argument("--starttls", dest="starttls", + help="Use a STARTTLS variant to establish the TLS connection. Possible values include smpt, imap, xmpp.") parser.add_argument("host", metavar='HOST[:PORT]', help="The host to check") args = parser.parse_args() @@ -89,8 +91,15 @@ if __name__ == "__main__": host = args.host port = 443 + # get options + options = [] + if args.starttls is not None: + options += ['-starttls', args.starttls] + # run the test - results = test_host(host, port) + results = test_host(host, port, options) + + # print the results for protocol, ciphers in results.items(): print(protocol+":") if ciphers is None: