Forum Stats

  • 3,837,918 Users
  • 2,262,309 Discussions
  • 7,900,432 Comments

Discussions

keytool won't allow me to genkeypair for older keystore with 5-character password

Craig_B
Craig_B Member Posts: 1

I have an older keystore with a 5-character password. It was last updated in 2014, probably with the 1.5 or 1.6 version of keytool. Current versions of keytool insist that all passwords be at least 6 characters long.

Anyway, this keystore can be opened successfully by our app using the 5-character password, and I can use that password and the -list command to display the contents. However, when I try to generate a new key pair, keytool won't accept the valid 5-character password. It throws the error "keytool error: java.lang.Exception: Key password must be at least 6 characters".

I can understand that error being thrown when creating a new keystore, but keytool should allow me to update an existing keystore, regardless of the password length. Does anyone know of a workaround to force current versions of keytool to be backwards-compatible with this older keystore? I'd like to avoid creating a new keystore from scratch.

This discussion has been closed.