Digitally signing a PDF in linux

Apr 10th, 2012 | By | Category: Linux / Freebsd

Good fun today as one of my team members sent me over a digitally signed PDF and that got me looking into how I would go about signing it back.  Up until this point I had just been putting an old fashioned signature on it and sending it out but upon further research it appears that digital signatures are accepted in the US and Canada and are more secure and a lot quicker than signing it the old fashioned way.  So how does a linux user go about doing it?  Pretty easily actually.

I used Portable Signer for my signing as it’s java based and has a nice easy GUI.. So you’ll need to go grab that and get it installed.  Before it’s going to be any use to you though you are going to need a PFX signature file.  To create one of those you need to make sure openssl is installed and do the following:

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem

Next we need to export mycert.pem as PKCS#12 file, mycert.pfx

openssl pkcs12 -export -out mycert.pfx -in mycert.pem -name “My Certificate”


After that is done you can open up portable signer, choose the input pdf, choose the signature file and off you go.  You’ll need a proper cert for it to come up without warnings the first time but it’s signed.. One less analog step in our business, yay for the future!



Tags: , , , ,

Leave a Comment