Re: M2Crypto SMIME Mail verification error in Outlook and Thunderbird

Heikki Toivonen <[email protected]>
Newsgroups gmane.comp.python.cryptography
Message-ID <[email protected]>
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 tried the demo/smime.howto/sign.py file, and modified as follows:

Index: sign.py
===================================================================
--- sign.py     (revision 383)
+++ sign.py     (working copy)
@@ -30,8 +30,13 @@
 out.write('Subject: M2Crypto S/MIME testing\n')
 s.write(out, p7, buf)

-print out.read()
+msg = out.read()

+import smtplib
+server = smtplib.SMTP('my mail server here')
+server.sendmail('my email here', 'my email here', msg)
+server.quit()
+
 # Save the PRNG's state.
 Rand.save_file('randpool.dat')


I received that email in Thunderbird and it said the signature is not
valid because the cert used to sign the message was issued by an
untrusted CA. This was expected, since these are test certificates.

If you get this far, next step would be for you to test by creating a CA
and singer cert for the test email, and then import the test CA into the
trusted authorities in Thunderbird and Outlook. After that step they
should recognize it as valid signature. Does it work for you?

Please note that interoperability can be tricky; all these programs have
specific requirements for certificates for things to work. Google around
and/or read the OpenSSL mailinglists to find out if/how other people
have solved the interoperability issues.

-- 
  Heikki Toivonen
signature.asc (application/pgp-signature, 251 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEIIlZb8x8KoP+JuwRAgl1AKCQrRXAkmtZJeykQEVjoCW3Fx5h1gCfb6Qt
yYzxLtNZBhEQwsdpFioPLHU=
=jZPu
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.