« Back to Index

[Check TLS version using by Python]

View original Gist on GitHub

Tags: #python #tls #ssl

Check TLS version using by Python.py

# Python 3.5.2-slim

import json
from tornado.httpclient import HTTPClient

response = HTTPClient().fetch("https://www.howsmyssl.com/a/check").body.decode()
data = json.loads(response)
tls_version = data["tls_version"]

print(tls_version)"  # TLS 1.2