我正在尝试使用Java keystore工具自动化生成密钥库。我正在使用的命令是:
keytool -keystore keystore -alias jetty -genkey -keyalg RSA
但在执行此命令后,用户需要按照以下方式输入特定的输入:
Enter keystore password: password
What is your first and last name?
[Unknown]: jetty.mortbay.org
What is the name of your organizational unit?
[Unknown]: Jetty
What is the name of your organization?
[Unknown]: Mort Bay Consulting Pty. Ltd.
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=jetty.mortbay.org, OU=Jetty, O=Mort Bay Consulting Pty. Ltd.,
L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes
Enter key password for <jetty>
(RETURN if same as keystore password): password
用户无需输入这些值,是否有任何方式可以在命令中或通过脚本提供这些值而无需用户交互?
谢谢