skillfed

backports.ssl

The Python 3.4 standard `ssl` module API implemented on top of pyOpenSSL

backports-ssl v0.0.9 108.3K downloads/30d#12,567 on PyPI11
Permissive license MIT Abandoned released

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-ssl

uv

uv add backports-ssl

poetry

poetry add backports-ssl

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Topic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries

Tags

ssl module backport python 2.6 2.7pyopenssl wrapper ssl apihttps support older pythonssl context python 2tls socket legacy python versionsbackport ssl modulepython 3.4 ssl on python 2
legacy-pythonabandoned

More Libraries packages