-
-
Save rsatrio/58af394606f49195e2fa5c648d2cec43 to your computer and use it in GitHub Desktop.
Check signature on PDF File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ByteArrayInputStream pdfBytes=new ByteArrayInputStream( | |
Files.readAllBytes(Paths.get(pdfFile.getAbsolutePath()))); | |
pdfDoc=PDDocument.load(pdfFile); | |
pdfDoc.getSignatureDictionaries().forEach(signature-> { | |
try { | |
//Get PKCS#7 Data | |
CMSSignedData signedData=new CMSSignedData(signature.getContents()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment