XhstormR


On a dark desert highway, cool wind in my hair.


JDK Keytool

Updated on 2020-10-12

生成密钥对:
keytool -genkeypair -keystore release.jks -storepass changeit -alias release -keyalg RSA -dname "cn=123" -ext "san=dns:*.example.com,ip:127.0.0.1" -validity 365
keytool -list       -keystore release.jks -storepass changeit

导出证书:
keytool -exportcert -keystore release.jks -storepass changeit -alias release -file release.cer -rfc
keytool -printcert -file release.cer

信任证书:
keytool -importcert -cacerts -trustcacerts -storepass changeit -alias release -file release.cer -noprompt
keytool -list -cacerts -storepass changeit

删除证书:
keytool -delete -cacerts -trustcacerts -storepass changeit -alias release

Reference

TOP