[PYTHON-CRYPTO] M2Crypto SMIME Mail verification error in Outlook and Thunderbird

Heikki Toivonen heikki at OSAFOUNDATION.ORG
Tue May 23 19:10:33 CEST 2006


Patrick Hagelkruys wrote:
> I tried to digital sign a message with m2crypto and verify it with Outlook.
> But Outlook (also Thunderbird) failed to verify the signature, because the
> digital signature of the message is invalid. 

I looked at what the OpenSSL smime tool does, and noticed it sets the
detached flag as well, which you didn't do in your sample below. When I
add that, I get output that looks compatible with the openssl tool.

In other words, change this:

>     p7 = s.sign(buf,SMIME.PKCS7_TEXT)

To this:

p7 = s.sign(buf,SMIME.PKCS7_TEXT|SMIME.PKCS7_DETACHED)

-- 
  Heikki Toivonen


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20060523/7e6e4cb2/attachment.pgp>


More information about the python-crypto mailing list