From f62947bdba33b8bb9d99bbf0654e7e72fe6dfeba Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 21 Jul 2014 11:08:54 +0200 Subject: [PATCH 1/1] Add option to use STARTTLS --- ssl-check | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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: -- 2.30.2