1
votes

I'm not an expert at these but I'm just following the code as listed on the Android developers website

keytool -genkey -v -keystore orbii.jks -keyalg RSA -keysize 2048 -validity 10000 -alias orbii

for signing a keystore. However, I end up getting a SHA1 certificate for the keytool? I have the latest version of Android SDK and I need a SHA256 certificate in order to be able to use the Amazon Gamecircle feature. How can I create a keystore with a SHA256 certificate instead of SHA1? Thanks!

2
See this answer for full keytool arguments(rsa, sha256, SubAltName, etc..) also use Java7 or Java8 stackoverflow.com/a/61674251/185565Whome

2 Answers

1
votes

You may be using Java 6.

Keytool from JDK 7 and higher uses SHA256WithRSA for RSA and SHA256withECDSA for EC key pairs as default algorithms.

1
votes

Specify -sigalg SHA256withRSA. Strange its not defaulting to this however, as Java 6 and 7 both should.