Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/requests/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__", ""),
Expand All @@ -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,
Expand Down