summaryrefslogtreecommitdiffstats
path: root/test/lib/ansible_test/_data/sslcheck.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/ansible_test/_data/sslcheck.py')
-rwxr-xr-xtest/lib/ansible_test/_data/sslcheck.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/lib/ansible_test/_data/sslcheck.py b/test/lib/ansible_test/_data/sslcheck.py
new file mode 100755
index 00000000..37b82279
--- /dev/null
+++ b/test/lib/ansible_test/_data/sslcheck.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+"""Show openssl version."""
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import json
+
+# noinspection PyBroadException
+try:
+ from ssl import OPENSSL_VERSION_INFO
+ VERSION = list(OPENSSL_VERSION_INFO[:3])
+except Exception: # pylint: disable=broad-except
+ VERSION = None
+
+
+def main():
+ """Main program entry point."""
+ print(json.dumps(dict(
+ version=VERSION,
+ )))
+
+
+if __name__ == '__main__':
+ main()