You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by Dave Oxley <da...@daveoxley.co.uk> on 2006/06/01 12:01:50 UTC

Re: Help with X.509 public key decryption of XML

I have been doing an awful lot of reading and experimenting and still
have problems. I am now trying to sign an xml document with an RSA key.
The key's generated like this:
        KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
        keyGen.initialize(2048, sr);
        KeyPair keypair = keyGen.generateKeyPair();
        PrivateKey privKey = keypair.getPrivate();

And when I call:
         sig.sign(privKey);

I get this exception:
org.apache.xml.security.signature.XMLSignatureException: No installed
provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
Original Exception was
org.apache.xml.security.signature.XMLSignatureException: No installed
provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
Original Exception was java.security.InvalidKeyException: No installed
provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
        at org.apache.xml.security.signature.XMLSignature.sign(Unknown
Source)

or this exception with BC:
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
        at org.apache.xml.security.signature.XMLSignature.sign(Unknown
Source)

What am I doing wrong? This is driving me nuts, I've been working on
this 4 days straight now.

Cheers,
Dave.


Unsubscribed

Posted by ga...@cmcltd.com.
> I have been doing an awful lot of reading and experimenting and still
> have problems. I am now trying to sign an xml document with an RSA key.
> The key's generated like this:
>         KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
>         keyGen.initialize(2048, sr);
>         KeyPair keypair = keyGen.generateKeyPair();
>         PrivateKey privKey = keypair.getPrivate();
>
> And when I call:
>          sig.sign(privKey);
>
> I get this exception:
> org.apache.xml.security.signature.XMLSignatureException: No installed
> provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
> Original Exception was
> org.apache.xml.security.signature.XMLSignatureException: No installed
> provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
> Original Exception was java.security.InvalidKeyException: No installed
> provider supports this key: sun.security.rsa.RSAPrivateCrtKeyImpl
>         at org.apache.xml.security.signature.XMLSignature.sign(Unknown
> Source)
>
> or this exception with BC:
> 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
>         at org.apache.xml.security.signature.XMLSignature.sign(Unknown
> Source)
>
> What am I doing wrong? This is driving me nuts, I've been working on
> this 4 days straight now.
>
> Cheers,
> Dave.
>
>