Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
680 views
in Technique[技术] by (71.8m points)

java - keytool -genkey runs in a loop to generate .keystore file

I invoked this on cmd:

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

The tool runs, asks the questions, and then loops again to the questions. It doesn′t generate the .keystore.

Please help. I can′t pass that loop to generate my .keystore.

I′ve given all permisions to java/bin folder, also changed the folder to C:/ but still runs in a loop after the last question. I type "y" and "yes" to confirm the .keystore creation but doesn′t generate one. Please help. Thanks. What other permissions/setups do I need to check?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

KeyTool uses a locale-specific resource bundle for comparing your answer to the confirmation question with "yes"/"y". In other words: It expects the 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

Answering in English ("yes") to the above question would have been interpreted by keytool as "user did not confirm" and therefore keytool would start over with the questions.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...