Keytool -genkey runs in a loop to create a .keystore file

I called this on cmd:

keytool -genpair -v - keystore myrelease.keystore -keyalg RSA - keysize 2048 -validity 1000 

The tool starts, asks questions, and then asks questions again. It does not generate .keystore.

Please, help. I cannot pass this loop to create my .keystore.

I gave all permissions to the java / bin folder, also changed the folder to C: /, but it still works in a loop after the last question. I type "y" and "yes" to confirm the creation of .keystore, but do not generate it. Please help. Thank you What other permissions / settings need to be checked?

+5
source share
1 answer

KeyTool uses a locale-specific resource set to compare your answer with a confirmation question with yes / y. In other words: he is awaiting an answer in the same language as the question.

For example, in German:

  Ist CN=test, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=DE richtig? [Nein]: ja 

The answer in English (β€œyes”) to the above question would be interpreted by keytool, because β€œthe user did not confirm”, and therefore keytool will start with the questions.

+6
source

Source: https://habr.com/ru/post/1234649/


All Articles