I have two files. one is doc and another is pdf. Now, what I want to do:
I tried to get the information of digital certificate from doc/pdf using OPENSSL, CERTUTIL, JAVA, PHP, iTEXT, TCPDF etc etc. There are tons of way to sign a file or get information from cert/pem etc. but how to get the file which contains the information of that specific word/pdf file.
Now, I even do not know, where the digital certificate stored in the MS word and PDF. Has anyone any idea on this ?
Thank you for taking your time. ANY OPINION will be a big help for this newbie.
Both DOC/DOCX formats and PDF formats define digital signatures in format specifications. You can't use OpenSSL or other similar general-purpose stuff for verifying signatures of documents in these formats. Maybe iText can validate the PDF signature, but I have yet to see a library to handle DOCs.
The SecureBlackbox component suite (namely its OfficeBlackbox and PDFBlackbox packages), which we maintain, can do exactly what you need - validate digital signatures, extract and validate certificates used to sign documents in Office (MS Office, OpenOffice/LibreOffice) and PDF documents.