Keytool 是一个JAVA环境下的安全钥匙与证书的管理工具.它管理一个存储了私有钥匙和验证相应公共钥匙的与它们相关联的X.509 证书链的keystore(相当一个数据库,里面可存放多个X.509标准的证书).。
# keytool --help
缺省情况下,-list 命令打印证书的 MD5 指纹,而如果指定了 -v 选项,将以可读格式打印证书,如果指定了 -rfc 选项,则表示以base64输出文件,否则以二进制输出。
# keytool -list -rfc -keystore keystore -storepass "storepwd"
# keytool -v -list -keystore keystore -storepass "storepwd"
# keytool -printcert -sslserver 192.168.1.103:2019 -rfc
# keytool -printcert -sslserver 192.168.1.103:2019 -rfc > /etc/pki/ca-trust/source/anchors/nexus.crt
# update-ca-trust
参考
常用Keytool 命令
http://www.willrey.com/support/keytool_command.html
【keytool】用keytool创建keystore和trustsotre文件
https://www.jianshu.com/p/1b1c9cfa17a4
【keytool】如何使用使用Java密钥库工作?
https://www.jianshu.com/p/d67d5d76fd84
【keytool】Signing Certificates With Your Own CA
https://www.jianshu.com/p/a30a0459102e
证书及证书管理(keytool工具实例)
https://www.cnblogs.com/benwu/articles/4891758.html