documentation: https://m2crypto.readthedocs.io/
email list: https://lists.sr.ht/~mcepl/m2crypto (subscribe via email)
discussion channel: matrix:r/m2crypto:ceplovi.cz
issue tracker: |-
https://todo.sr.ht/~mcepl/m2crypto (R/O, please
report issues via the email list).
maintainer: "Matěj Cepl"
web-Site: https://codefloe.com/mcepl/m2crypto/
M2Crypto
M2Crypto = Python + OpenSSL + SWIG
:alt: builds.sr.ht status
:target: https://builds.sr.ht/~mcepl?
NOTE: This library is currently in maintenance mode (and it has been in it since 2014 and I don’t plan to stop maintaining it anytime soon). For new applications we recommend using a more modern alternative such as PyCA/cryptography. Examples of how to migrate can be found in the documentation.
M2Crypto is a crypto and SSL toolkit for Python.
M2 stands for "me, too!"
M2Crypto comes with the following:
- RSA, DSA, DH, HMACs, message digests, symmetric ciphers including AES,
- TLS functionality to implement clients and servers.
- Example SSL client and server programs, which are variously threading, forking or based on non-blocking socket IO.
- HTTPS extensions to Python's httplib, urllib and xmlrpclib.
- Unforgeable HMAC'ing AuthCookies for web session management.
- FTP/TLS client and server.
- S/MIME v2.
- ZSmime: An S/MIME messenger for Zope.
We care a lot about stable API and all Python methods should be
preserved, note however that m2. namespace is considered internal to
the library and it doesn't have to be preserved. If however some change
to it breaks your app, let us know and we will try to make things
working for you.
- And much more.
M2Crypto is released under a very liberal BSD-2-Clause licence. See LICENSES/BSD-2-Clause.txt for details.
To install, see the file INSTALL.
Look at the tests and demos for example use. Recommended reading before deploying in production is "Network Security with OpenSSL" by John Viega, Matt Messier and Pravir Chandra, ISBN 059600270X.
Note these caveats:
- Possible memory leaks, because some objects need to be freed on the Python side and other objects on the C side, and these may change between OpenSSL versions. (Multiple free's lead to crashes very quickly, so these should be relatively rare.)
- No memory locking/clearing for keys, passphrases, etc. because AFAIK Python does not provide the features needed. On the C (OpenSSL) side things are cleared when the Python objects are deleted.
Have fun! Your feedback is welcome.
Metadata
Release files for M2Crypto 0.50.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| m2crypto-0.50.0.tar.gz | 538.1 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| m2crypto-0.50.0-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details |
| m2crypto-0.50.0-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| m2crypto-0.50.0-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| m2crypto-0.50.0-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| m2crypto-0.50.0-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
Total release size: 1.9 MB
Release files / m2crypto-0.50.0.tar.gz
| Download URL | m2crypto-0.50.0.tar.gz |
|---|---|
| Size | 538.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4162b1fbb51ef3b3f98cb81e086d706cad8fe7620a5549f398c1efbc0dad0d92
|
|
BLAKE2b-256 checksum How to use checksums |
4025d909899fe1be051df16749049412045d90f56acae2c8f2c5b57f29694cc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / m2crypto-0.50.0-cp314-cp314-win_amd64.whl
| Download URL | m2crypto-0.50.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 287.2 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7d5f0d8ecfce3861f0e66d2429b606795775077bbe4c6cb7feb1a00c4274ecc5
|
|
BLAKE2b-256 checksum How to use checksums |
a29c86f1dc4ce95a4d5409edde7501ccf13d495b865ca67d2574de780bcbb47c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / m2crypto-0.50.0-cp313-cp313-win_amd64.whl
| Download URL | m2crypto-0.50.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 279.8 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
696c1da9b0dcd099d082658051483c54f190adf2818ce7f8b9069853f0e2d408
|
|
BLAKE2b-256 checksum How to use checksums |
5038de733d3845f5c1000a385f16bd40003ebc6878e527eb7553c9aeeba6edfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / m2crypto-0.50.0-cp312-cp312-win_amd64.whl
| Download URL | m2crypto-0.50.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 279.7 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2f51574396a1da07f4c2a9ac6b4d02fb50de71060f2a537d282554d1d07f0411
|
|
BLAKE2b-256 checksum How to use checksums |
bb2c8372c82b701eafdf07ac641e6546f41f382959c767023d7db14e20079291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / m2crypto-0.50.0-cp311-cp311-win_amd64.whl
| Download URL | m2crypto-0.50.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 280.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
15111005c5653628c471e9639215b0c288869112ebda49650029e4b9af3c7b9a
|
|
BLAKE2b-256 checksum How to use checksums |
56e7c67bc4d617a47afdea99176f8118a855b095685c7d0cb8f7cc88c7c46f1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / m2crypto-0.50.0-cp310-cp310-win_amd64.whl
| Download URL | m2crypto-0.50.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 280.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c02edffb1741fe9891f4b20d4b71b6d07dcf1a2a6e21f560d8aae70ef76fd33f
|
|
BLAKE2b-256 checksum How to use checksums |
f3bb0a763615bfbc66f9866f668a801ad0753fcb22004fbb84f87512e07207bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitLab CI/CD, verified by PyPI on Sep 9, 2026.
Transparency log