P7M Viewer for Mac OS X

Recently I convinced my boss in switching from Windows-based clients to Mac OS X ones. Unfortunately one of the activity we dealt with required the ability of reading P7M files, that’s files that have been digitally signed and encoded in PCKS#7 SMIME Mail.

I searched a lot but wasn’t able to find a P7M viewer for Mac OS X… With Windows Acrobat Reader itself reads the P7M, while Acrobat for Mac doesn’t…, so I started investigating.

The command line to decode a P7M file is pretty easy:

openssl smime -decrypt -in file_in.pdf.p7m -inform DER -verify -noverify -out file_out.pdf

So the deal was to allow any user to view the files without having to deal with the Terminal.

Luckily enough with a great help from my friend Marco Balestra, we quickly hacked an AppleScript Application that can be used to decrypt the P7M, launch the viewer, and then delete the temporary file.

Here you find it attached. Just Unzip it, right click on the P7M and select “Open with…”

Obviously it comes with no warranties of any kind 🙂

Ermh… I forgot the attachment, here it is: OpenP7M