Add content to PKCS7 detached signature
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.
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.
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.
精彩评论