--- id: backports-ssl-match-hostname version: "3.7.0.1" license: Python Software Foundation License license_treatment: permissive maintenance: abandoned --- # backports.ssl_match_hostname — The ssl.match_hostname() function from Python 3.5 License: permissive · Maintenance: abandoned · Downloads: 642.6K/mo ## What it is and what it does This package backports the ssl.match_hostname() function from Python 3.7 to earlier Python versions. It implements RFC 2818 (and later RFC 6125) compliant hostname matching for SSL/TLS certificates, ensuring that the hostname in a server's certificate matches the hostname you are connecting to—a critical security check for encrypted connections. The function was introduced in Python 3.2 and has been part of the standard library ever since. This backport was designed for projects supporting older Python versions that lacked the function. However, the package has been abandoned since 2019 and is now obsolete for any project running Python 3.2 or later, which includes all modern Python versions. Use it for: - Validating SSL certificates in legacy Python 2.x applications that need hostname verification before Python 3.2 was available. - Ensuring secure HTTPS connections in older Python codebases by checking certificate hostnames match the target server. - Porting Python 3.x code to run on Python 2.4–2.7 while maintaining SSL security checks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides the ssl.match_hostname() function for validating that a server's SSL certificate hostname matches the hostname being connected to, backported from Python 3.7 for use on earlier Python versions. No. This package is abandoned (last release 2019-01-12) and unnecessary for any modern Python project. Python 3.2+ includes match_hostname() in the standard library; Python 2.x is end-of-life. Install only if maintaining legacy Python 2.x code that cannot be upgraded—otherwise use the built-in ssl.match_hostname(). ## Install pip install backports-ssl-match-hostname uv add backports-ssl-match-hostname poetry add backports-ssl-match-hostname ## Installing backports.ssl_match_hostname Before you install: The package is abandoned as of 2019-01-12 and has not been updated in 2771 days. Modern Python versions (3.2+) include match_hostname() in the standard library, making this backport unnecessary for current projects. High install friction due to its age and obsolescence. License in practice: Licensed under the Python Software Foundation License (permissive), which poses no restrictions on use or redistribution. Quickstart: from backports.ssl_match_hostname import match_hostname, CertificateError import ssl sslsock = ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_SSLv23, cert_reqs=ssl.CERT_REQUIRED, ca_certs=...) try: match_hostname(sslsock.getpeercert(), hostname) except CertificateError: pass Only needed for Python versions earlier than 3.2; modern Python includes match_hostname() in the standard library ssl module. Verify before relying: - Whether this package is still maintained or if it has been formally deprecated in favor of the standard library. - Whether any security patches have been applied since the last release in 2019. ## Package facts - License: Python Software Foundation License (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 642.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ssl certificate hostname validation, match_hostname backport, ssl certificate verification, hostname matching ssl, python ssl certificate check, rfc 2818 hostname matching, legacy-python, ssl-tls, deprecated [View on SkillFed](https://skillfed.io/packages/backports-ssl-match-hostname) · [View on PyPI](https://pypi.org/project/backports-ssl-match-hostname/)