Skip to content
This repository was archived by the owner on Nov 17, 2021. It is now read-only.

Refactored the SMime signer #1023

Closed
wants to merge 2 commits into from

Conversation

janflora
Copy link
Contributor

Q A
Bug fix? yes
New feature? yes
Doc update? no
BC breaks? no
Deprecations? no
Fixed tickets #834, #822
License MIT
  • Support for full MIME message wrapping (message/rfc822) for both signing and encryption was added. This has been described in RFC5751 section 3.1.
  • The methods that carries out signing and encryption have been completely rewritten and a lot of comments were added to explain what's going on. This was not very clear before.
  • The above mentioned rewrites fixed Sending encrypted email with attachment #834 and fixed Settings Content-Transfer-Encoding multiple times during S/MIME encryption #822.
  • A public method was added to the Swift_Message class to clear all attached signers. This way it is possible to reuse the existing message object when signing and/or encrypting.
  • A "Null" MIME content encoder was added to help recreating MIME parts from byte streams. OpenSSL is used carry out the actual encryption and signing. The resulting MIME part is returned as a byte stream (file) and needs to be parsed back into a Swift message. Since the content of the byte stream already has the correct encoding, the appropriate content encoder just needs to set the correct header and not touch the body content at all.

janflora added 2 commits November 24, 2017 23:11
* Support for full MIME message wrapping (message/rfc822) for both signing and encryption was added
* Fixes swiftmailer#834 and fixes swiftmailer#822
* The methods that carries out signing and encryption have been completely rewritten and a lot of comments were added to explain what's going on
* A public method was added to the Swift_Message class to clear all attached signers
* A "Null" MIME content encoder was added to help creating MIME parts where the content is already encoded, and you just need to indicate the encoding to Swift mailer
@Rotzbua
Copy link
Contributor

Rotzbua commented Nov 25, 2017

@janflora Hi, can you add some comments to the code which reference to the according rfc? It is a little bit hard to review the code if I always have to search the definition ;) Thanks.

@janflora
Copy link
Contributor Author

@Rotzbua I already did here: https://github.com/swiftmailer/swiftmailer/pull/1023/files#diff-459e6d445d75ee83376d20ec2381b158R183
Right now it goes in the description of the method that toggles the functionality. Should I move it somewhere else?

@janflora
Copy link
Contributor Author

janflora commented Dec 5, 2017

@Rotzbua Any news on this? I'll be happy to explain the changes I did in even more detail if that will help with the code review.

@janflora
Copy link
Contributor Author

@Rotzbua @fabpot Could you please let me know what you want me to do in order to get this change merged? I actually think that I made a valuable contribution and I would really like to help out others by getting these changes into the master branch. If you let too much time pass here, I'll forget the details of the implementation and it will take me a lot of time to get back into it if changes has to be made. Thanks.

@fabpot
Copy link
Member

fabpot commented Dec 16, 2017

Thank you @janflora.

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

Successfully merging this pull request may close these issues.

Sending encrypted email with attachment Settings Content-Transfer-Encoding multiple times during S/MIME encryption
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy