Skip to main content

documentation: https://m2crypto.readthedocs.io/
email list: https://lists.sr.ht/~mcepl/m2crypto (subscribe via email)
IRC channel: irc://irc.ergo.chat/#m2crypto
issue tracker: |-
https://todo.sr.ht/~mcepl/m2crypto (R/O, please
report issues via the email list).
maintainer: "Matěj Cepl"
web-Site: https://sr.ht/~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. 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.47.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for M2Crypto 0.47.0
File Size Uploaded Provenance Actions
m2crypto-0.47.0.tar.gz 662.5 kB Without provenance Details for m2crypto-0.47.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for M2Crypto 0.47.0
File Actions
m2crypto-0.47.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for m2crypto-0.47.0-cp314-cp314-win_amd64.whl
m2crypto-0.47.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for m2crypto-0.47.0-cp313-cp313-win_amd64.whl
m2crypto-0.47.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for m2crypto-0.47.0-cp312-cp312-win_amd64.whl
m2crypto-0.47.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for m2crypto-0.47.0-cp311-cp311-win_amd64.whl
m2crypto-0.47.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for m2crypto-0.47.0-cp310-cp310-win_amd64.whl

Total release size: 2.1 MB

Release files / m2crypto-0.47.0.tar.gz

Download URL m2crypto-0.47.0.tar.gz
Size 662.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9256300be1e0412be802aa1f827e0ce7f94deb1099b8ccdcfd9867a7f0f975bf
BLAKE2b-256 checksum
How to use checksums
8b19409bcaf2820beb0cb6e52e807c6af3ac535edd494e599c7eceb01c6534c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / m2crypto-0.47.0-cp314-cp314-win_amd64.whl

Download URL m2crypto-0.47.0-cp314-cp314-win_amd64.whl
Size 287.2 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
c92ab5a7748ea966db2ba10a197d320e5d9b6c6101455652488db06be51cd260
BLAKE2b-256 checksum
How to use checksums
44a59b9d8f345514d77f436aeb55249605a2ffd2cc3d46834f4ca95e41de5401
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / m2crypto-0.47.0-cp313-cp313-win_amd64.whl

Download URL m2crypto-0.47.0-cp313-cp313-win_amd64.whl
Size 281.9 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
c3583438fc90bd7eff56c19d7a4ba81542d9c0b93f2862e4e43165ac9ac5e610
BLAKE2b-256 checksum
How to use checksums
94fe08a857352b8ac27104704dcc311e57ecd6b19733e61309a9db736fa6a3b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / m2crypto-0.47.0-cp312-cp312-win_amd64.whl

Download URL m2crypto-0.47.0-cp312-cp312-win_amd64.whl
Size 282.0 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
7b209f531320828d8a20c7745e30f0999b426776b3d036a5551f2fc5907fbf2e
BLAKE2b-256 checksum
How to use checksums
8e557cc7ac58615e99dbcee151c637655fadd608434d0744d39571b21d624c1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / m2crypto-0.47.0-cp311-cp311-win_amd64.whl

Download URL m2crypto-0.47.0-cp311-cp311-win_amd64.whl
Size 282.4 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b49984f69a01c686a66eb65b5deb4f1244706817e80fa37554ef9d8c506d93fa
BLAKE2b-256 checksum
How to use checksums
7803b72c1fda7251ba4f3b1b15acaff88c4d4255aa97978aca4639c0f00a641f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / m2crypto-0.47.0-cp310-cp310-win_amd64.whl

Download URL m2crypto-0.47.0-cp310-cp310-win_amd64.whl
Size 282.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
34d6354ec544a69ce465d767bdf145f0c3e24a850faae773694d629fb656c0d9
BLAKE2b-256 checksum
How to use checksums
877b12ccb460e37e5bb6dfd40ade547698481eec148ecf112cae5bb66276ea71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for M2Crypto 0.47.0

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.

Release history Release notifications | RSS feed

This release

0.47.0 This release

6 release files No provenance

0.13

0.11

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page