Keytool 是一个JAVA环境下的安全钥匙与证书的管理工具.它管理一个存储了私有钥匙和验证相应公共钥匙的与它们相关联的X.509 证书链的keystore(相当一个数据库,里面可存放多个X.509标准的证书).。

#  keytool --help

69217a853567

缺省情况下,-list 命令打印证书的 MD5 指纹,而如果指定了 -v 选项,将以可读格式打印证书,如果指定了 -rfc 选项,则表示以base64输出文件,否则以二进制输出。

# keytool  -list  -rfc  -keystore  keystore   -storepass  "storepwd"

69217a853567

# keytool -v -list -keystore keystore -storepass "storepwd"

69217a853567

# 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

69217a853567

参考

常用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

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐