Bug 104881

Summary: Add ability to extract signature information (PKCS #7) to tools
Product: poppler Reporter: Hanno Böck <hanno>
Component: utilsAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium CC: chinmoyrp65, oliver.sander
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: sigdump patch
signature extraction patch

Description Hanno Böck 2018-01-31 09:53:00 UTC
Created attachment 137081 [details] [review]
sigdump patch

It would be very helpful if one of the poppler utils supported extracting signatures from PDF files. I looked quite a bit and it seems there's no other free pdf tool currently capable of doing this.

I'll attach a quick+dirty patch I got from Tavis Ormandy which adds a "sigdump" tool that does this and writes a PKCS #7 object to a file. However this is just an example, I guess a more elegant solution would be to have a parameter to the pdfsig tool that extracts a signature to a file.
Comment 1 oliver.sander 2018-01-31 12:22:36 UTC
If you got this far, could you try to integrate this into pdfsig?
Comment 2 Hanno Böck 2018-01-31 16:40:53 UTC
I'll try when I find time (though I didn't write the patch, it's as I said from Tavis).
Comment 3 Chinmoy 2018-04-07 17:43:48 UTC
Created attachment 138678 [details] [review]
signature extraction patch

I have created a patch integrating the changes from the previous patch into pdfsig tool. Please have a look.
Comment 4 Albert Astals Cid 2018-04-17 09:09:30 UTC
Pushed, thanks :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.