You'll have to use an external signature. The internal signing mode only
supports RSA and DSA. I want to move all the signing logic to
bouncycastle and avoid this and other problems but there's always
something more urgent to attend to.
Paulo
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Maximilian Schmidt
> Sent: Thursday, July 17, 2008 12:55 PM
> To: [email protected]
> Subject: [iText-questions] signing/embedding PKCS7 using a key with EC
>
> Dear all,
>
> I'm trying to sign a bunch of PDF documents using a PKCS12 keystore.
> Using the great HowToSign tutorial I already managed to do this in no
> time. However, once I try to do the same with a PKSC12
> containing keys
> that use elliptic curves (EC), I get the following error:
> ExceptionConverter: java.security.NoSuchAlgorithmException:
> Unknown Key
> Algorithm EC
> at com.lowagie.text.pdf.PdfPKCS7.<init>(PdfPKCS7.java:401)
> at
> com.lowagie.text.pdf.PdfSigGenericPKCS.setSignInfo(PdfSigGener
> icPKCS.java:97)
> at
> com.lowagie.text.pdf.PdfSignatureAppearance.preClose(PdfSignat
> ureAppearance.java:787)
> at
> com.lowagie.text.pdf.PdfSignatureAppearance.preClose(PdfSignat
> ureAppearance.java:717)
> at com.lowagie.text.pdf.PdfStamper.close(PdfStamper.java:200)
> at
> org.emayor.softsigner.SoftSignerOld.sign(SoftSignerOld.java:174)
> at
> org.emayor.softsigner.SoftSignerOld.main(SoftSignerOld.java:60)
> Could not inject signature: Unknown Key Algorithm EC
>
> I've managed to produce a P7M with the same key using only
> BouncyCastle,
> so I assume at some point iText uses its own logic for these things.
> I've also tried to force the provider used by doing
>
> PdfSignatureAppearance sap = stp.getSignatureAppearance();
> sap.setProvider( BouncyCastleProvider.PROVIDER_NAME );
>
> but that doesn't solve this issue. Any comments on how I
> could get this
> working?
>
> Thanks in advance,
> Max
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar