I am building a .NET software that must be integrated with a system that accept signed and encrypted files.
The other party provided one .P12 file for signing and one .PEM file for encrypting.
The other party also provided me an example procedure with openssl commands.
First of all, they tell me that I should create PEM file from the P12 file:
openssl pkcs12 –in SIGN.P12 –out SIGN.PEM
I picked up a random password MYPASS
Then I should use those PEM files in order to sign my original file:
openssl smime -sign -in INPUT.xml -signer SIGN.PEM -passin pass:MYPASS -outform der -binary -nodetach -out SIGNED.P7M
Next step is to encrypt the signed file:
openssl smime -encrypt –in SIGNED.P7M –outform der –binary –des3 -out ENCRYPTED.ENC OTHERPARTYCERTIFICATE.PEM
The question is: how to achieve this using just Chilkat.NET library?