我正在尝试使用keytool命令为我的应用程序生成密钥库:
keytool -genkey -alias tomcat -keystore tomcat.keystore -keyalg RSA -keysize 2048 < keystore.data.txt
它与JDK5一起正常工作,而不是使用JDK6。 供参考:
使用JDK5执行时
Enter keystore password: What is your first and last name?
[Unknown]: What is the name of your organizational unit?
[Unknown]: What is the name of your organization?
[Unknown]: What is the name of your City or Locality?
[Unknown]: What is the name of your State or Province?
[Unknown]: What is the two-letter country code for this unit?
[Unknown]: Is CN=tpserver-hostname, OU=MyCompany, O=MyOrg., L=MyCity, ST=MyState (ST), C=IN correct?
[no]:
Enter key password for <tomcat>
(RETURN if same as keystore password):
与JDK6执行相同的操作
Enter keystore password: Re-enter new password: They don't match. Try again
Enter keystore password: Re-enter new password: They don't match. Try again
Enter keystore password: Re-enter new password: They don't match. Try again
Too many failures - try later
请帮助我。
答案 0 :(得分:1)
我解决了我的问题。
'重新输入新密码:'是jdk6&amp;中的新功能jdk7版本而不是用jdk5询问。因此,在我的'keystore.data.txt'文件中复制并添加了密码下的新密码,然后就可以生成密钥库文件了。
答案 1 :(得分:1)
是的,你是对的。自JDK6以来添加了“重新输入新密码”。所以你必须输入密码