santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arshad Noor <arshad.n...@strongauth.com>
Subject Re: Creating a detached RSA_SHA256 signature
Date Sat, 07 Apr 2012 18:51:28 GMT
You're trying to use a DSA key with the RSA algorithm.  Check your code
to make sure that you have the correct algorithm for the corresponding
key-type.

If you're trying to use XMLSignature with an RSA key-pair, then must
have the key generated and in a keystore before you run the program;
search for "keytool" on the internet for instructions on how to
generate an RSA key-pair)

Arshad Noor
StrongAuth, Inc.

On 04/07/2012 11:37 AM, Pushpalanka Jayawardhana wrote:
> Hi,
>
> I have a requirement to generate a detached RSA signature using the
> RSAwithSHA256 signature
> identifier:http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
> <http://www.ietf.org/rfc/rfc4051.txt>
> over several files (HTML,CSS, JavaScript  etc.) Trying out the samples I
> could generate an enveloping signature using DSA. But when I change the
> SignatureMethodURI to "XMLSignature.ALGO_ID_SIGNATURE_RSA_SHA256" I got
> the following error.
>
> Exception in thread "main"
> org.apache.xml.security.signature.XMLSignatureException: No installed
> provider supports this key: sun.security.provider.DSAPrivateKey
> Original Exception was java.security.InvalidKeyException: No installed
> provider supports this key: sun.security.provider.DSAPrivateKey
> at
> org.apache.xml.security.algorithms.implementations.SignatureBaseRSA.engineInitSign(SignatureBaseRSA.java:167)
> at
> org.apache.xml.security.algorithms.SignatureAlgorithm.initSign(SignatureAlgorithm.java:238)
> at
> org.apache.xml.security.signature.XMLSignature.sign(XMLSignature.java:591)
> at
> org.apache.xml.security.widgets.CreateSignature1.main(CreateSignature.java:161)
>
> I am totally new to Santuario and so thankful to anyone who can give me
> some hints on where should I look to correct this. Also any resource on
> making detached signatures with Santuario is highly valued.
>
>
> Thank you and Best Regards,
> --
> Pushpalanka Jayawardhana | Undergraduate | Computer Science and Engineering
> University of Moratuwa
>
> +94779716248 | http://pushpalankajaya.blogspot.com
>
> Twitter: http://twitter.com/Pushpalanka| Slideshare:
> http://www.slideshare.net/Pushpalanka
>
>
>

Mime
View raw message