You want to put a sha256 where it doesn't fit. Forget about it! There
are two ways of signing in PDF using a CMS container (without going
into CAdES): adbe.pkcs7.detached and adbe.pkcs7.sha1. If using
adbe.pkcs7.sha1 the digest that goes into the data section in the CMS
must use sha1. If using detached the digest used depend on the
signature in the certificate and you can't chose it. If you still want
to use sha256 you'll have to ask someone else as I've no idea what
you're talking about.

Paulo

On Tue, Mar 20, 2012 at 10:50 PM, Rocco David <[email protected]> wrote:
> I see that example and I try him.It's ok for sha1 but it doesn't work when I
> try to force digest algorithm.
> The problem is that *cmsSigner.DigestAlgorithm * is sha1 by  default (i see
> it with debug into Visual Studio).
>  In my previous post I said that when trying to set it to sha256  at line
> signedCms.ComputeSignature (CmsSigner, false);
>
>  *I could return Invalid algorithm specified*.
>
>  Could you please describe more clearly what you mean by:
>  "/The detached method Does not use an external hash, just the one defined
>  in the signature (RsaWithSha256 for example). This Means That You
>  do not have any hash and supply the cms with the full doc /"
>  Thanks again for the availability
>
> --
> View this message in context: 
> http://itext-general.2136553.n4.nabble.com/Problem-to-sign-using-Sha256-tp4471288p4490624.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> 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

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
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