12b33c79ee
(cherry picked from commit 36ab3d1189
)
Co-authored-by: Matt Clay <mclay@redhat.com>
24 lines
494 B
Python
Executable file
24 lines
494 B
Python
Executable file
#!/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()
|