Hi, I'm using a similiar code from the link below, but the keystore is a jks keystore http://itextpdf.sourceforge.net/howtosign.html#howtoverify
I'm trying to verify the timestamp certificates with this method but I'm receiving always false. PdfPKCS7.verifyTimestampCertificates(ts, keyStore, null); I have imported the timestamp public key certificates to the jks keyStore ts is obtained from getTimeStampToken method from PdfPKCS7: PdfPKCS7 pk = af.verifySignature(name) TimeStampToken ts = pk.getTimeStampToken(); The timestamp corresponds to this file if (ts != null) { cal = pk.getTimeStampDate(); boolean impr = pk.verifyTimestampImprint(); System.out.println("Timestamp imprint verifies: " + impr); System.out.println("Timestamp date: " + cal); } Timestamp imprint verifies: true Timestamp date: java.util.GregorianCalendar[time=1358339473240,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Madrid",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=165,lastRule=java.util.SimpleTimeZone[id=Europe/Madrid,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2013,MONTH=0,WEEK_OF_YEAR=3,WEEK_OF_MONTH=3,DAY_OF_MONTH=16,DAY_OF_YEAR=16,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=1,HOUR_OF_DAY=13,MINUTE=31,SECOND=13,MILLISECOND=240,ZONE_OFFSET=3600000,DST_OFFSET=0] If timestamp correspond to this file and the public key certificate is in the keyStore. Why I'm not receiving true from PdfPKCS7.verifyTimestampCertificates(ts, keyStore, null)?
------------------------------------------------------------------------------ Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php