Hi,
I am trying to recieve an encrypted email attachment and then decrypt the attachment using open ssl. I am successful in decrypting the file. The file that I recieve is in smime.p7m extension. When I decrypt that file the file is decrypted and the file that is decrypted displays the data into base64 encoded data with the following headers.
MIME-Version: 1.0
Content-Type: multipart/mixed;
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message test
Content-Type: text/xml; name=Abc.xml
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=Abc.xml
And the data beneath this header is base 64 encoded. Now what I want to achieve is that I should be able to convert the file in Abc.xml directly with the xml data displaying in it. How can I achieve this. I am mentioning the openssl commands that I am using for decrypting the file.
openssl smime -decrypt -in smime.p7m -inform DER -inkey privkey.pem -out GHI.xml
Thanks in advance.