PDF ファイルの特定の署名のタイムスタンプの存在を確認しようとしています。これまでのところ、私はこのコードに行き着きました:
RandomAccessFileOrArray random =
new RandomAccessFileOrArray(new File("temp.pdf").getAbsolutePath());
PdfReader reader = new PdfReader(random, null);
AcroFields af = reader.getAcroFields();
ArrayList<?> names = af.getSignatureNames();
//this are the signatures?
for (Object o : names){
AcroFields.Item item = (Item) af.getFields().get((String)o);
//this is the class for verifying the signature,
//how do I get it from the item?
PdfPKCS7 pdfPKCS7 = null; //XYZ ???
Calendar signingDate = pdfPKCS7.getTimeStampDate();
}
どうやら署名にアクセスできたようですが、署名を検証するには PdfPKCS7 クラスにアクセスする必要があります。どうすればそこにたどり着くことができるか、誰にもわかりませんか?