Sign a PDF in Ruby with a .p12 file

I need to SIGN a PDF with a .p12 file, the problem is that I need to define keyUsage to sign, but, with the ORIGAMI library I can’t use some codes that I find on the internet. Any idea how to do it?