1

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!

Justin
  • 111
  • 1
  • 4
  • 8
  • See this answer for full keytool arguments(rsa, sha256, SubAltName, etc..) also use Java7 or Java8 https://stackoverflow.com/a/61674251/185565 – Whome May 08 '20 at 07:45

2 Answers2

1

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.

always_a_rookie
  • 4,515
  • 1
  • 25
  • 46
1

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

Dori
  • 18,283
  • 17
  • 74
  • 116