Reputation: 1
I have a content application that stores PKCS7 detached signatures in a database and the original file on the disk. Now I'll have to send an unique file to a customer containing the original document and the signature, as it if were signed attached. Note that the document hasn't been and won't be encrypted. Does someone knows how to do it, programmaticaly (in .Net, Java, ...) or with a command line tool?
Thanks.
Upvotes: 0
Views: 2633
Reputation: 239321
The S/MIME specification shows how you can take a detached PKCS #7 signature and a cleartext document and combine them into one multipart MIME message.
Upvotes: 1
Reputation: 42018
The book "Beginning Cryptography With Java" comes with examples which you can download for free here. In the chapter 9 folder is an example called SignedDataExample.java
that might help.
Upvotes: 2