Hi,

I'm using v1.3.0 and have the same exception when signing an xml document as a post to this list a couple of months ago:

http://tinyurl.com/lnfgx

i.e. when I use my own keystore and call sig.sign(privateKey) I get the exception at the foot of this email.

There wasn't a solution given to the other post, so I was wondering if anyone here can help give the definitive answer.

I guess the problem will be with my keystore - so can anyone give me some help about how to create a keystore using a .pem key and certificate supplied to me from a third-party CA (all the examples I see about creating a keystore using keytool use generated/self-signed certificates - which doesn't apply to this situation).

This is driving me nuts!

Thanks for any help anyone can offer.

Ed.

==================

Exception:

Exception in thread "main" org.apache.xml.security.signature.XMLSignatureException : No installed provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
     [java] Original Exception was org.apache.xml.security.signature.XMLSignatureException: No installed provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
     [java] Original Exception was java.security.InvalidKeyException: No installed provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
     [java]     at org.apache.xml.security.signature.XMLSignature.sign (Unknown Source)
     [java]     at test.CreateSignature.main(CreateSignature.java:154)
     [java] org.apache.xml.security.signature.XMLSignatureException: No installed provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
     [java] Original Exception was java.security.InvalidKeyException: No installed provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
     [java]     at org.apache.xml.security.algorithms.implementations.SignatureDSA.engineInitSign (Unknown Source)
     [java]     at org.apache.xml.security.algorithms.SignatureAlgorithm.initSign(Unknown Source)
     [java]     at org.apache.xml.security.signature.XMLSignature.sign(Unknown Source)
     [java]     at test.CreateSignature.main(CreateSignature.java:154)
     [java] java.security.InvalidKeyException: No installed provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
     [java]     at java.security.Signature$Delegate.chooseProvider (Signature.java:1059)
     [java]     at java.security.Signature$Delegate.engineInitSign(Signature.java:1100)
     [java]     at java.security.Signature.initSign(Signature.java:485)
     [java]     at org.apache.xml.security.algorithms.implementations.SignatureDSA.engineInitSign (Unknown Source)
     [java]     at org.apache.xml.security.algorithms.SignatureAlgorithm.initSign(Unknown Source)
     [java]     at org.apache.xml.security.signature.XMLSignature.sign(Unknown Source)
     [java]     at test.CreateSignature.main(CreateSignature.java:154)
     [java] Java Result: 1



Reply via email to