我正在尝试使用Java密钥库工具自动生成密钥库.我使用的命令是:
keytool -keystore keystore -alias jetty -genkey -keyalg RSA
Run Code Online (Sandbox Code Playgroud)
但是在此命令之后,用户需要输入以下输入:
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 …Run Code Online (Sandbox Code Playgroud) 我以各种方式签署了我的jar,但是当我使用命令时,我不断收到上述错误消息:
jarsigner -verify -verbose [my jar]
Run Code Online (Sandbox Code Playgroud)
有没有办法摆脱这个错误?如果没有重新认证,我的代码会在六个月后停止工作吗?
以下是用于生成密钥并在Jar上签名的整套命令:
keytool -genkey -keystore [keystore] -alias [alias] -validity 2000
keytool -selfcert -keystore [keystore] -alias [alias] -validity 2000
jarsigner -keystore [keystore] [jar] [alias]
Run Code Online (Sandbox Code Playgroud)