tornado_m2crypto
This extension is meant to run tornado with M2Crypto instead of the standard python SSL
Dependencies
Of course, you need M2Crypto You need a patched version of Tornado: git+https://github.com/DIRACGrid/tornado.git@iostreamConfigurable
How to use
The tornado_m2crypto/tests directory contains several examples. Basically, just take any normal https server with tornado you want, and add the following at the beginning
# Patching
# needed because some direct calls to ssl_wrap_socket in TCPServer
from tornado_m2crypto.m2netutil import m2_wrap_socket
import tornado.netutil
tornado.netutil.ssl_wrap_socket = m2_wrap_socket
# Dynamically configurable
import tornado.iostream
tornado.iostream.SSLIOStream.configure('tornado_m2crypto.m2iostream.M2IOStream')
import tornado.httputil
tornado.httputil.HTTPServerRequest.configure('tornado_m2crypto.m2httputil.M2HTTPServerRequest')
How to test
There are several types of tests.
Unit test
Almost a copy paste of the SSLIOStream tests from tornado:
tox -r
HTTPS test
A simple HTTPS server
tox -r -e m2io_https
You can then talk to you using (only requires requests package)
python test_client.py
DIRAC test
An HTTPS server converting the certificate to "DIRAC certificates"
tox -r -e m2io_dirac
You can talk to it the same way as the normal HTTPS test, and you can give it a proxy
Metadata
Release files for tornado-m2crypto 0.1.6
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 |
|---|---|---|---|---|
| tornado_m2crypto-0.1.6.tar.gz | 78.5 kB | Without provenance | Details for tornado_m2crypto-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tornado_m2crypto-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for tornado_m2crypto-0.1.6-py3-none-any.whl |
Total release size: 115.2 kB
Release files / tornado_m2crypto-0.1.6.tar.gz
| Download URL | tornado_m2crypto-0.1.6.tar.gz |
|---|---|
| Size | 78.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba1fca6bcea5f2651560cc3a249d6fed7a4c40a9fe6b2d7fe78808cf065d5691
|
|
BLAKE2b-256 checksum How to use checksums |
8a8713724fc992369d369f73268a365f4cfabaf6f813648b0de1d36436869989
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.18
|
Release files / tornado_m2crypto-0.1.6-py3-none-any.whl
| Download URL | tornado_m2crypto-0.1.6-py3-none-any.whl |
|---|---|
| Size | 36.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
123c4eed8250a945b5b7ea64d2afb0f842729455fe97a925c672a177012e4d7a
|
|
BLAKE2b-256 checksum How to use checksums |
353dce3d43ab10fe5ed97138bce3dbe9ad79e04d8fab7d8b0c5e66be1dd695ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.18
|
Security for tornado-m2crypto 0.1.6
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.