I'm sorry, it should be using the BC PrivateKey to sign a document. Can you tell me how to configure provider when signing?
On Sat, Mar 22, 2008 at 3:57 AM, Sean Mullan <[EMAIL PROTECTED]> wrote: > It sounds as if you may be using the BC PrivateKey with a provider that > doesn't support it. Have you also configured your providers such that > BouncyCastle is used when signing? > > --Sean > > Jesse Pelton wrote: > > D'oh. I should have noticed that. I imagine the intent really is to sign > > with a private key, which of course makes perfect sense. > > > > Assuming that's the case, can anyone answer the question? > > > > ------------------------------------------------------------------------ > > *From:* Brent Putman [mailto:[EMAIL PROTECTED] > > *Sent:* Friday, March 21, 2008 3:02 PM > > *To:* security-dev@xml.apache.org > > *Subject:* Re: encrypt with pkcs12 private key > > > > Also, you said "encryption", but the exceptions below seem to indicate > > that you are trying to sign, not encrypt. > > > > > > Jesse Pelton wrote: > >> Why would you want to encrypt with a private key? Anyone with the > >> corresponding public key (which is, after all, public) can decrypt the > >> message, rendering the encryption useless. > >> > >> > ------------------------------------------------------------------------ > >> *From:* huang zhimin [mailto:[EMAIL PROTECTED] > >> *Sent:* Friday, March 21, 2008 12:37 PM > >> *To:* security-dev@xml.apache.org > >> *Subject:* encrypt with pkcs12 private key > >> > >> I use BouncyCastleProvider to get a private key from a p12 file, when > >> i use the private key to encrypt xml document, i get the exception as > >> follows: > >> > >> org.apache.xml.security.signature.XMLSignatureException: No installed > >> provider supports this key: > >> org.bouncycastle.jce.provider.JCERSAPrivateCrtKey > >> Original Exception was > >> org.apache.xml.security.signature.XMLSignatureException: No installed > >> provider supports this key: > >> org.bouncycastle.jce.provider.JCERSAPrivateCrtKey > >> Original Exception was java.security.InvalidKeyException: No installed > >> provider supports this key: > >> org.bouncycastle.jce.provider.JCERSAPrivateCrtKey > >> > >> does it mean that xml security do not support pkcs12 keystore? > >> > >> -- > >> My msn spaces: http://flyerhzm.spaces.live.com > > -- My msn spaces: http://flyerhzm.spaces.live.com