Daniel Perez Alvarez, Daniel Perez Alvarez wrote: > My problem is that I have some signed PDFs, and now I have to timestamp > them. > > I'm quite a newbie regarding the PDF format... I'm using iText, and I've > seen that I can add a PdfPKCS7 signature with a timestamp to the PDF, but > I don't know how to retrieve an existing signature and append/modify the > timestamping information. > > It looks like the timestamping information is an unauthenticated > attribute, with the id 1.2.840.113549.1.9.16.2.14, but I don't know how to > alter attributes in a PDF.
ISO 32000-1:2008 recommends inclusion of timestamps in PKCS#7 signatures as unsigned attributes; therefore, retroactively adding timestamps to them is theoretically possible. There are a number of reasons, though, why you shouldn't walk that road: * as the range in the PDF file reserved for the PKCS#7 container is determined before the actual PKCS#7 signature is created, and as it's fixed from then on, there simply may not be enough space left in a number of your PDFs; this space cannot be expanded without invalidating the signature itself; * if there are PDFs with multiple integrated signatures, only the last one may be changed, as all prior ones are part of the data signed by the later ones; * if there is a timestamp embedded in a PKCS#7 container, its time according to ISO 32000-1:2008 is considered to be the time of signing which in your case would be wrong. As you are from Spain, though, you might want to go the ETSI way and generate document time stamps as per ETSI TS 102 778-4 (PAdES-LTV). Regards, Michael. PS: Have you checked, by the way, whether all the signatures you have really are PKCS#7 signatures? Alternatively plain PKCS#1 signatures may also be in use. Or maybe xml signatures in case of XFA forms. -- View this message in context: http://itext-general.2136553.n4.nabble.com/Add-timestamp-to-signed-PDF-tp2247722p2247894.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
