projects
/
tls-check.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add option to use STARTTLS
[tls-check.git]
/
ssl-check
diff --git
a/ssl-check
b/ssl-check
index 3b8a4d060084cc584871c92fc8b28b40bb3e836b..63d156a533cbff7b470293e677bb9e651f3dc964 100755
(executable)
--- 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')
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()
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
host = args.host
port = 443
+ # get options
+ options = []
+ if args.starttls is not None:
+ options += ['-starttls', args.starttls]
+
# run the test
# 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:
for protocol, ciphers in results.items():
print(protocol+":")
if ciphers is None: