bbottema/simple-java-mail

Simple Java Mail should have optional support for signed S/MIME attachments

bbottema opened this issue · 8 comments

Refer to bbottema/outlook-message-parser#4.

Simple Java Mail should include support for signing with SMIME. Both reading attachments (when converting for example) and when adding new attachments in the builder API.

I've got it working for parsing .msg files, but it seems some fields are lost in the conversion. Currently analyzing over at bbottema/outlook-message-parser#4.

Added S/MIME support when parsing signed (not encrypted) .eml / .msg data.

image

Started working on supporting encrypted emails as well.

To properly test S/MIME encrypted emails properly, I need the following:

  1. signed (already have that one)
  2. encrypted
  3. signed, then encrypted
  4. encrypted, then signed
  5. maybe: some combination of multiple encryption/sign passes (should be rare in real world usage, but in theory this is possible and should be handled correctly as well)

Some help with this would be greatly appreciated.

Ok, I succeeded finally with Thunderbird where Outlook still refuses, using the following guide:

I can't determine the exact order of signing and encrypting, nor do it multiple times in Thunderbird, so this is what I've got:

  1. S_MIME test message signed.zip
  2. S_MIME test message encrypted.zip
  3. S_MIME test message signed & encrypted.zip (order still unknown)

keys & certificates.zip

Bah, it was quite complicated due to the way the S/MIME spec tries to maintain backwards compatibility with older emails and Markenwerk's smime library having bugs... But, I've finished implemented both encrypted and / or signed messages. Implemented in Simple Java Mail, will be in the 6.0.0 release.

Will work on the documentation now for this feature.

Finished implementation, including properties support and final documentation.

Released in 6.0.0-rc1.

6.0.0 has released as well, finally.