I'm attempting to read the date of digital signatures in a PDF document using the following code:
try {
final PdfReader reader = new PdfReader(this.etimesheet.getAbsolutePath());
final AcroFields fields - reader.getAcroFields();
if (fields != null) {
final ArrayList names - fields.getSignatureNames();
for (int k=0; k < names.size(); ++k) {
String name = (String)names.get(k);
PdfPKCS7 pk = fields.verifySignature(name); // Code starts generating Warnings here
// Calendar cal = pk.getSignDate();
}
...
After adding the PdfPKSCS7 line, I receive the warning "ExceptionConverter: java.security.NoSuchAlgorithmException: SHA256 MessageDigest not available".
What do I need to resolve this issue, or is there another way to extract the date from a digital signature?