On 05/19/2016 01:31 AM, Kyle Francis wrote:
For signing and encrypting openssl_pkcs7_sign/encrypt return fully encoded text files that are ready to be sent by a mail agent, whereas the message_ready hook is looking for a Mail_mime object.
That's unfortunate. However, if you'd like to sign+encrypt you'll still need to "parse" the message (split headers and body at least), right?
What would be the recommended course, either parse the file to create a Mail_mime object, or would there be a way to pass along the fully mail agent ready text from opening_pkcs7?
For PGP we replace Mail_mime with our wrapper enigma_mime_message, so all logic should be put there. The most important method is get(). I don't see a reason why it wouldn't work. You should start in enigma_engine::sign_message() and encrypt_message(), but you probably saw them already.