Hi,
Currently, I want sign and encrypt a XML file by using the library CryptoAPI in C#. In fact, I want do the same work that OpenSSL with the following command line:
openssl smime -sign -in file.xml -out file.out -passin pass:test -binary -nodetach -inkey certificat.priv.pem -signer certificat.pub.pem
To realize this with C# on a desktop application, I have just used the functions of SignedXML. Unfortunately, these functionalities don’t exist in Compact Framework! So, I try to construct my XML by hand by using CryptoAPI. My code works fine but my XML is different from that obtained by OpenSSL.
Here an abstract of my XML:
UNKNOWN STRING (in base 64, it begins by “MII…”) <?xml version="1.0"?><test> CONTENT OF MY XML <signature>…</signature></test> FIRST UNKNOWN string (perhaps the Public Key) SECOND UNKNOWN string (in this string, there is the current date)
So, with CryptoAPI, I've calculated the digest value and the signature. With XMLDocument functions, I have inserted these informations into my XML. Now, I search to understand the composition of the unknown strings described above.
Can you explain me the content of these unknown strings? I have already done several searches but I’ve not found explanation.
Thank you by advance for your help!
Best regards