backports.ssl
-------------
What is it?
-----------
It's the Python 3.4 standard ``ssl`` module API implemented on top of
pyOpenSSL::
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))
print conn.getpeercert()
conn.close()
Why?
----
Because the latest web technologies should be available to those running older
versions of Python.
Isn't this obsoleted by `PEP 466`_?
-----------------------------------
If you're on Python 2.7, then probably. But PEP 466 doesn't cover Python 2.6,
3.2, or 3.3, and the ``ssl.RAND_*()`` functions are explicitly out of scope.
This package supports it all.
How do I use it with third-party libraries?
-------------------------------------------
Monkey-patching support is included a la `gevent`_::
import backports.ssl.monkey as monkey
import requests
monkey.patch()
requests.get('https://google.com')
Why am I getting ``AttributeError``\ s for newer features?
------------------------------------------------------
Like the standard ``ssl`` module, certain attributes will not be available if
your OpenSSL does not support them. See `Installing OpenSSL`_ for instructions.
Installing OpenSSL
------------------
TODO
----
- Verify that we play nicely with gevent's monkey-patching.
- Backport and pass the standard Python ``ssl`` test suite.
- If not that, automate testing against hyper, urllib3, requests, and Tornado
test suites.
- Use the bundled 3.x OpenSSL, if available and newer than the default.
.. _`PEP 466`: http://legacy.python.org/dev/peps/pep-0466
.. _`gevent`: http://gevent.org
Metadata
Release files for backports.ssl 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| backports.ssl-0.0.9.tar.gz | 11.6 kB | Without provenance | Details for backports.ssl-0.0.9.tar.gz |
Release files / backports.ssl-0.0.9.tar.gz
| Download URL | backports.ssl-0.0.9.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
079549f44a5d52e6b6c97455cc322725e0590772237d6dc362cda57635128e1d
|
|
BLAKE2b-256 checksum How to use checksums |
ca39e968b8823a469dd7135ff960057aa27e8a226d2b1ac0a38701e26ce2e19f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for backports.ssl 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.