Skip to main content

M2Crypto

Maintainer:

Matěj Cepl

Web-Site:

https://sr.ht/~mcepl/m2crypto/

Documentation:

https://m2crypto.readthedocs.io/

Email list:

https://lists.sr.ht/~mcepl/m2crypto (subscribe via email)

Issue tracker:

https://todo.sr.ht/~mcepl/m2crypto (R/O, please report issues via the email list).

M2Crypto = Python + OpenSSL + SWIG

builds.sr.ht status

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 MIT licence. See LICENCE 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.45.1

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.45.1
File Size Uploaded Provenance Actions
m2crypto-0.45.1.tar.gz 363.7 kB Without provenance Details for m2crypto-0.45.1.tar.gz

Built distributions (wheels)

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

Total release size: 2.0 MB

Release files / m2crypto-0.45.1.tar.gz

Download URL m2crypto-0.45.1.tar.gz
Size 363.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d0fc81a8828edbf4308432b3040bf06bb26bad95abb9e7d4690b6118551e76ec
BLAKE2b-256 checksum
How to use checksums
ad6933db804ea9c50175df3508d97bd3c33926913480bbd951008b92f678b138
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

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

Download URL m2crypto-0.45.1-cp313-cp313-win_amd64.whl
Size 252.1 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
13c068f7087caeda69245ffdaf5965537b86b02586d00b215604fb5b773b1e4f
BLAKE2b-256 checksum
How to use checksums
acae71dffab80f3e80b4253bc8b032d8602c8563c0988d5b32c06d9a9b599b89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

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

Download URL m2crypto-0.45.1-cp312-cp312-win_amd64.whl
Size 252.1 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
18305c1c8bb8ffcc1a52af4b350facc1271f98f052b96f7a86b3f51aef7acfad
BLAKE2b-256 checksum
How to use checksums
6a7dbea05a18f270bd12fc4e003faa43e15c8600c05e35d18e086c3c5a8ad8a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / m2crypto-0.45.1-cp312-cp312-win32.whl

Download URL m2crypto-0.45.1-cp312-cp312-win32.whl
Size 194.8 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
ba7e49348dc267a1e57658601470f6f49cd6418ab6e665d3fffbb56fd8eec215
BLAKE2b-256 checksum
How to use checksums
a67225e22e414c7b09d87b49489ebe8ba8ac8fbb8b425d4229c717b6dbe3bd7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

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

Download URL m2crypto-0.45.1-cp311-cp311-win_amd64.whl
Size 253.1 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9029c737bd5d8a7ab4e6eae14db1f6aed257e022160b1a8981d4224bb3b2ff3e
BLAKE2b-256 checksum
How to use checksums
33c1ec130c4b0a2df353759856c6dbe4a7b7af805713bde3b14f1d1e8729c854
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / m2crypto-0.45.1-cp311-cp311-win32.whl

Download URL m2crypto-0.45.1-cp311-cp311-win32.whl
Size 195.5 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
6ad3f13e548254d7be6f4d84733768a8f84c5b49f3acbfc96c29aa23463204fc
BLAKE2b-256 checksum
How to use checksums
6286ee8eb5cc8bf11a0dc33243a38916d3e6dbf9b8a9c6737e1014c6ae4f1cf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

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

Download URL m2crypto-0.45.1-cp310-cp310-win_amd64.whl
Size 252.9 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
2eceae6a8df327d5014342c6c84fe3e42bebc4ab12bf1bf5a3684e8dcd169372
BLAKE2b-256 checksum
How to use checksums
5226b2c0be55a7fb460cad4ff194aef28cc904825dc948e0ad2ec80c12fc4f98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / m2crypto-0.45.1-cp310-cp310-win32.whl

Download URL m2crypto-0.45.1-cp310-cp310-win32.whl
Size 195.4 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
09f4ad3875a813cb090254705d4f25bd4920730b01e4bd71c571ea42e5fdc6e8
BLAKE2b-256 checksum
How to use checksums
21ee3ac5d5545383db81cdb5213fcd71ee6466360b87fad3d74796a2c62109ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for M2Crypto 0.45.1

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.45.1 This release

8 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