Hi Hynek,

did you see this example:
http://itextpdf.com/examples/index.php?page=example&id=225

If I understand you correctly, you have timestamp as byte[] array and you
don't know how to use it with PdfPKCS7.getEncodedPKCS7(byte[] secondDigest,
Calendar signingTime, TSAClient tsaClient, byte[] ocsp). Maybe you can
create your own TSAClient class and implement both methods to return your
timestamp as byte[] array and its length and pass your TSAClient class to
getEncodedPKCS7 function. See the example above for details and change this
section:

TSAClient tsc = null;
if (withTS) {
    String tsa_url    = properties.getProperty("TSA");
    String tsa_login  = properties.getProperty("TSA_LOGIN");
    String tsa_passw  = properties.getProperty("TSA_PASSWORD");
    tsc = new TSAClientBouncyCastle(tsa_url, tsa_login, tsa_passw);
}

Hope this will help you.

Juraj.


2010/7/7 Hynek Horák <[email protected]>

> Hello,
>
> I have some problems with using iText to sign PDF with timestamp. I have
> own routines to obtain timestamp token, but i don't know how to use this
> token (DER encoded) with getEncodedPKCS7 - in general, i want to submit
> token as a byte[] value, so i don't want to use getTimeStampToken... Is
> there any possibility to do that?
>
> Thanks in advance,
>
> HH
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> 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/
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
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/

Reply via email to