Raffaele,

Raffaele wrote
> I'va an external Signature Service that give me the signed hash in SHA256.
> Now i've to insert this hash into a pdf file.
> 
> [...]
> 
> And the signature is ok.
> Now i've to timestamping the signature field.
> I've used the code:
> 
>             [...]
>             LtvVerification v = stamper.LtvVerification;
>             AcroFields af = stamper.AcroFields;
>             foreach (string sigName in af.GetSignatureNames())
>             {
>                 v.AddVerification(sigName, new OcspClientBouncyCastle(),
> new CrlClientImp(), LtvVerification.CertificateOption.WHOLE_CHAIN,
> LtvVerification.Level.OCSP_CRL, LtvVerification.CertificateInclusion.YES);
>             }
>             PdfSignatureAppearance sap = stamper.SignatureAppearance;
>             sap.CertificationLevel =
> PdfSignatureAppearance.CERTIFIED_NO_CHANGES_ALLOWED;
>             // Telecom TSA
>             TSAClientBouncyCastle tsa = new TSAClientBouncyCastle(TSA_URL,
> TSA_ACCNT, TSA_PASSW, 6500, "sha256");
>             LtvTimestamp.Timestamp(sap, tsa, null);
> 
> but it append another sing to the document.
> 
> What's wrong???

What do you mean by "it append another sing to the document"?

You used code which appends PAdES style long term validation information and
a document time stamp.

If you did not want to do this but instead add a signature time stamp
attribute to the signature container, you should look at

http://itextpdf.sourceforge.net/howtosign.html#signtsocspjava (Java) or
http://itextpdf.sourceforge.net/howtosign.html#signtsocspcs (C#)

for inspiration.

Regards,   Michael

--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Insert-TimeStamping-with-external-digest-tp4344945p4345100.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
iText-questions mailing list
[email protected]
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

Reply via email to