#1 2019-02-10 16:17:52

luigisic
Member
Registered: 2019-02-10
Posts: 1

How extract content from .p7m file

Hello,
  I have a File like "Document.xml.p7m" that contain a xml file. I need to extract the xml file from "Document.xml.p7m".
 
I discovered your library from <https://stackoverflow.com/questions/921 … er-utility> but I don't understand how to use TAESCBC.EncryptPKCS7 / TAESCBC.DecryptPKCS7 or other function to extract content from "Document.xml.p7m" file.

I wish have the same result of this command: "openssl smime -verify -in Document.xml.p7m -noverify -inform DER -out Document.xml"

There are somebody to help me?

Thanks.

Last edited by luigisic (2019-02-10 16:20:00)

Offline

#2 2019-02-10 17:06:51

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: How extract content from .p7m file

S-MIME .p7m files have a very complex file layout.
It sounds to be not just an encrypted content, but you need to parse MIME headers and encoding.
We don't have code for this yet.

You should better use an existing library.
Under Windows and Delphi, you may try something like https://www.emailarchitect.net/easendma … spx?cat=10

Offline

Board footer

Powered by FluxBB