Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bbottema opened this issue Dec 3, 2018 · 8 comments
Closed

Comments

@bbottema
Copy link
Owner

bbottema commented Dec 3, 2018

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.

@bbottema bbottema added this to the 6.0.0 milestone Dec 3, 2018
bbottema added a commit that referenced this issue Apr 7, 2019
bbottema added a commit that referenced this issue Apr 7, 2019
…rring attachment decryption to the S/MIME module
bbottema added a commit that referenced this issue Apr 7, 2019
…ersion, deferring attachment decryption to the S/MIME module
@bbottema
Copy link
Owner Author

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.

bbottema added a commit that referenced this issue Apr 16, 2019
… in the Email combined from both the signed attachment as well as from the original source if it pertains a conversion from Outlook .msg
bbottema added a commit that referenced this issue Apr 16, 2019
… in the Email combined from both the signed attachment as well as from the original source if it pertains a conversion from Outlook .msg
bbottema added a commit that referenced this issue Apr 21, 2019
bbottema added a commit that referenced this issue Apr 21, 2019
…l, msg). For EML (native JavaMail MimeMessage) the mime header is not parsed properly yet, missing smime-type and smime-name
@bbottema
Copy link
Owner Author

bbottema commented Apr 21, 2019

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

image

Started working on supporting encrypted emails as well.

@bbottema
Copy link
Owner Author

bbottema commented Apr 22, 2019

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.

@bbottema
Copy link
Owner Author

bbottema commented Apr 27, 2019

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

bbottema added a commit that referenced this issue Apr 27, 2019
bbottema added a commit that referenced this issue May 4, 2019
…ncluding S/MIME metadata of various S/MIME signing methods
bbottema added a commit that referenced this issue May 5, 2019
…IN and maybe in the future SIGNED_ENCRYPTED)
bbottema added a commit that referenced this issue May 12, 2019
…ng S/MIME meta data from Outlook and Mime messages!
@bbottema
Copy link
Owner Author

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.

bbottema added a commit that referenced this issue May 14, 2019
bbottema added a commit that referenced this issue May 15, 2019
…va Mail. Prepped the builder API and email instance and also implemented this in the S/MIME module. Now left is integrating both when sending email
bbottema added a commit that referenced this issue May 15, 2019
bbottema added a commit that referenced this issue May 19, 2019
…g using Simple Java Mail. Fixed a few bugs along the way. Now the only thing left to do is to finish CLI support for passing x509 certificate
bbottema added a commit that referenced this issue May 20, 2019
bbottema added a commit that referenced this issue May 21, 2019
…ng documentation about S/MIME signing / encrypting emails with Simple Java Mail
@bbottema
Copy link
Owner Author

Finished implementation, including properties support and final documentation.

@bbottema
Copy link
Owner Author

Released in 6.0.0-rc1.

@bbottema
Copy link
Owner Author

6.0.0 has released as well, finally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant