This is a little howto on how to understand the m2crypto Python module, beyond the examples provided:
- Build the documentation as explained here
- Look at the documentation, which does not contain a single comment
- Click the links that show the source (for example, of
M2Crypto.SMIME.SMIME.verify
) - Look what openssl function gets called by the function you are interested in (for example,
pkcs7_verify
something)) - Google the name of that openssl function, trying a few variations, until you find the openssl manpage that tells you what it does, in detail (for example, pcks_verify)
- Understand what it does, and backport the understanding to the thin convenience layer that m2crypto adds on top of it
- Realise that now you also understand the corresponding
openssl smime -verify
commandline invocation, and that next time instead of reading the openssl manpage you should look at the openssl api docs instead.