backports.ssl
The Python 3.4 standard `ssl` module API implemented on top of pyOpenSSL
What it is and what it does
backports.ssl brings the Python 3.4 ssl module API to older Python versions (2.6, 2.7, 3.2, 3.3) by implementing it on top of pyOpenSSL. This allows developers on legacy Python interpreters to use modern SSL/TLS socket operations—SSLContext, certificate verification, and related features—that would otherwise be unavailable. The package includes monkey-patching support to inject the backported ssl module into third-party libraries.
However, the package has been abandoned since its latest release on 2015-12-09 and receives no maintenance. It was designed to address a gap that PEP 466 partially closed for Python 2.7, but it remains the only option for Python 2.6, 3.2, and 3.3. Modern Python versions have native ssl support, and those interpreters are themselves long out of support.
Use it for:
- Running legacy Python 2.6 or 3.2 applications that need HTTPS connectivity without rewriting ssl code.
- Monkey-patching HTTP libraries on old Python to enable modern TLS verification.
- Accessing ssl.RAND_* functions on Python versions where PEP 466 does not apply.
- Maintaining compatibility with systems locked to Python 2.7 while using modern ssl API patterns.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides the Python 3.4 ssl module API on older Python versions (2.6, 2.7, 3.2, 3.3) by wrapping pyOpenSSL, enabling modern SSL/TLS socket operations on legacy interpreters.
No. The package is abandoned (last commit 2016-09-08) and targets Python versions that are themselves end-of-life and unsupported. If you are running Python 2.6, 3.2, or 3.3, you should upgrade to a modern Python version instead. If you must use an old version, the lack of maintenance means no security fixes or compatibility updates will be applied.
Install
backports-ssl on PyPI
pip
pip install backports-ssluv
uv add backports-sslpoetry
poetry add backports-sslInstalling backports.ssl
Before you install
High install friction: the package is archived and last updated 2015-12-09, with no commits since 2016-09-08. Maintenance is abandoned and security updates are unlikely.
License in practice
MIT license is permissive and imposes no restrictions on use or redistribution, but the package's abandonment means no legal updates or clarifications will be issued.
Quickstart
import backports.ssl as ssl
import socket
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.verify_mode = ssl.CERT_REQUIRED
conn = context.wrap_socket(socket.socket(socket.AF_INET))
conn.connect(('google.com', 443))
Requires pyOpenSSL to be installed; OpenSSL version on the system must support the SSL/TLS features you intend to use.
Verify before relying
- Whether pyOpenSSL is automatically installed as a dependency or must be installed separately.
- Current compatibility with modern OpenSSL versions and whether the package works with contemporary TLS standards.
- Whether monkey-patching support still functions correctly with current versions of gevent, requests, or other libraries.
- Security implications of using a backport from 2015 in modern threat environments.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,901 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 108,256/month — #12,567 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: backports.ssl-0.0.9.tar.gz
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
backports.ssl_match_hostnameProvides the ssl.match_hostname() function for…
permissive · top 15,000 on PyPI
python3-dtlsAdds DTLS (Datagram Transport Layer Security)…
permissive · top 15,000 on PyPI
pickle5Backports the pickle 5 protocol (PEP 574) and…
permissive · top 15,000 on PyPI
eval-type-backportEnables newer Python typing syntax (like `X |…
permissive · top 1,000 on PyPI
backports.shutil_get_terminal_sizeProvides the get_terminal_size() function for…
permissive · top 15,000 on PyPI
django-utils-sixProvides a backport of Django 2.2's…
permissive · top 15,000 on PyPI
ndg-httpsclientProvides enhanced HTTPS support for Python's…
permissive · top 5,000 on PyPI
nasslnassl is an OpenSSL wrapper for Python that…
agpl · top 15,000 on PyPI
linecache2Provides a backport of Python's linecache…
permissive · top 5,000 on PyPI