java.security.NoSuchAlgorithmException: RSA Signature not available
If you run the following code, you will get a list of signature algorithms supported by your Java installation.
TreeSet<String> algorithms = new TreeSet<>();
for (Provider provider : Security.getProviders())
for (Service service : provider.getServices())
if (service.getType().equals("Signature"))
algorithms.add(service.getAlgorithm());
for (String algorithm : algorithms)
System.out.println(algorithm);
When I run it (Windows, Java 1.8.0_65), I get:
MD2withRSA
MD5andSHA1withRSA
MD5withRSA
NONEwithDSA
NONEwithECDSA
NONEwithRSA
SHA1withDSA
SHA1withECDSA
SHA1withRSA
SHA224withDSA
SHA224withECDSA
SHA224withRSA
SHA256withDSA
SHA256withECDSA
SHA256withRSA
SHA384withECDSA
SHA384withRSA
SHA512withECDSA
SHA512withRSA
As you can see, RSA
is not a valid signature algorithm.
Maybe NONEwithRSA
is what you're after?
Please always refer to the documentation
Documentation