Hi

I need to generate a signed and encrypted SMIME message.
I see in the openssld apps that there is a sample that can sign OR
encrypt.
If I was to write my own to do signing AND encryption, then would I
follow the following steps:

Step 1: Sign the message using PKCS7_sign().
Step 2: i2d the P7 returned from PKCS7_sign().
Step 3: Encrypt the DER encoding from step 2 and call PKCS7_encrypt() on
it?
Step 4: Write the resulting P7 using SMIME_write_PKCS7 and send that to
my mail client for delivery?

I am not too sure about step 2. Do I need to DER encode the P7 returned
from step 1 or should I call SMIME_write_PKCS7 on the P& generated from
step 1 and then call encrypt on the result.

Please advise if my approach is wrong or if you have any suggestions.


Thanx


Himanshu Soni
Software Engineer
PKI Innovations, Inc.
http://www.pk3i.com
Suite 420 - 1122 Mainland Street
Vancouver, BC, Canada
V6B 5L1 
Phone: 604.484.7544 ext 107


 


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to