mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
494 B
Python
25 lines
494 B
Python
4 years ago
|
#!/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()
|