Meddington / OutlookPrivacyPlugin

A PGP encryption plugin for Outlook 2010, 2013 and 2016.
BSD 3-Clause "New" or "Revised" License
272 stars 60 forks source link

Consider using MimeKit (better MIME parser, supports PGP/MIME, etc) #59

Closed jstedfast closed 9 years ago

jstedfast commented 9 years ago

This sounds like an awesome project.

Just scanning through your README and your bug list, I think MimeKit will help solve at least a handful of problems.

For example, the following issues are likely to be fixed simply by using MimeKit:

issue #51 - MimeKit's OpenPGP logic for signing messages will first canonicalize the content so that it is wrapped appropriately (often encoding the content using quoted-printable so that decoding it produces the original content wrapping). issue #47 - I'm not familiar with the code and where the charset encodings are used, but MimeKit's APIs make using charsets easy. issue #40 - MimeKit's logic for sign+encrypt includes the OnePassSignature issue #34 - I suspect OPP already supports this if you support PGP/MIME, so I'm confused, but if not, MimeKit does. issue #28 - this should not be a problem in MimeKit because it looks for the key id needed to decrypt in your keyring. issue #16 - MimeKit supports signing with any hash algorithm supported by PGP with a nice API to select which one you want to use. README - MimeKit supports all PGP/MIME operations, so if you are missing encryption, MimeKit will fix that.

In addition to already providing a nice API and compliant implementation of OpenPGP/MIME, it's also a far better/faster parser than SharpMimeTools.

mygithuber commented 9 years ago

+1 It sounds pretty nice. Implementation together with OutlookPrivacyPlugin possible? Regards.

Meddington commented 9 years ago

It would be possible if the raw message source is accessible. Currently I'm not aware of how to gain access to it. If anyone knows please update this thread.

jstedfast commented 9 years ago

You can use any of the MimeKit.MimeMessage.WriteTo() methods to write the raw message data to a stream or to a file.

Each MimeEntity also has WriteTo() methods so you can write any individual MIME part to a stream or file to get the raw data.

Meddington commented 9 years ago

I'm referring to outlook, not your library. From my research it's not possible to gain raw access to the message source as outlook does not store it. There is a registry setting to cause it to be stored for pop3/imap, but that would not work with exchange.

jstedfast commented 9 years ago

Are you not getting the raw message source now? If not, how could you possibly verify signatures?