[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating digitally signed email with attached file



Hello.

I am successfully able to 
1. sign a simple message, 
2. encrypt a simple message and 
3. encrypt a signed simple mail message 

Also, I can create an attachment using MIME headers in a single file. 

How can I sign a mail message and include an attachment file. I expect
that only the message body would be signed. The only way I can make this
work is by inlining the attachment (which makes it part of the message).

I tried creating the multipart/signed output and then adding the MIME
entities around it, but my S/MIME multipart comes in as the message
content. In other words, it is not recognized. I guess the S/MIME must
be outer MIME entity.

When I place the attachment after the multipart/signed signed data, it
is ignored and not available to the receiver.

Can someone point me to the right approach? 

All I really need is an understanding of how this type of message is to
be built. I can't find any examples or spec definition for signed email
with attachment(s).

regards,
tt