diff --git a/src/requests/help.py b/src/requests/help.py index 8fbcd6560a..c3b0662159 100644 --- a/src/requests/help.py +++ b/src/requests/help.py @@ -93,9 +93,11 @@ def info(): "openssl_version": "", } if OpenSSL: + openssl_version = OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION) pyopenssl_info = { "version": OpenSSL.__version__, "openssl_version": f"{OpenSSL.SSL.OPENSSL_VERSION_NUMBER:x}", + "human_friendly_version": openssl_version.decode("utf-8"), } cryptography_info = { "version": getattr(cryptography, "__version__", ""), @@ -105,7 +107,10 @@ def info(): } system_ssl = ssl.OPENSSL_VERSION_NUMBER - system_ssl_info = {"version": f"{system_ssl:x}" if system_ssl is not None else ""} + system_ssl_info = { + "version": f"{system_ssl:x}" if system_ssl is not None else "", + "human_friendly_version": ssl.OPENSSL_VERSION, + } return { "platform": platform_info,