Configuring mhonarc to process application/x-pkcs7-mime signed data

2010-08-28 16:30:47
I recently had the need to deal with application/x-pkcs7-mime signed
data for one my personal archives since I've been receiving mails
for a project that use it.

MHonArc does not have direct support for the type, so the content
gets saved to an external file, which is of little use.

After I figured out how to utilize the openssl program to
extract the content successfully from the command-line, I leveraged
the simple callback API mhonarc provides to extract the signed
data out automatically.  Note, I do not care to validate the
signatures.  I just need to get at the message data.

Attached are two files depending on how you may need this
capability.  The mha-p7m script is a custom front-end replacement
for the standard 'mhonarc' command that registers the callbacks
for processing application/x-pkcs7-mime data.

The other attachment is a sample file defining
the callbacks so the regular 'mhonarc' command can still be used
(see reference manual on how to install  Using is beneficial if using something like mharc to manage
your archives so the application/x-pkcs7-mime extraction can be made
available for mharc-based archives.

I encourage anyone to extend what I have done to support
other application/x-pkcs7-mime content (e.g. encrypted data).
I did not bother with it since I do not need it and such
support requires dealing with key management, and I did not
want to mess with it at this time.

There may be a general use to make such support intrinsic to
mhonarc  and I have no problem if the openssl command is a required
dependency. However, I've been busy with other things for awhile to
do any real work on mhonarc so do not hold your breath waiting for
me to get something done.



Attachment: mha-p7m
Description: mha-p7m


<Prev in Thread] Current Thread [Next in Thread>
  • Configuring mhonarc to process application/x-pkcs7-mime signed data, Earl Hood <=