Keytool 证书工具使用小结

作者: afluy | 来源:发表于2017-01-20 17:54 被阅读0次

Keytool 是密钥和证书的管理工具, 用来管理密钥,X.509 证书链, 可信证书的密钥库(数据库)

相关资料

具体操作

1. 命令介绍

➜  keytool --help
Key and Certificate Management Tool

Commands:

 -certreq            Generates a certificate request  #生成一个证书请求文件, 用于向CA申请证书
 -changealias        Changes an entry's alias   #变更别名
 -delete             Deletes an entry    #删除
 -exportcert         Exports certificate     #导出证书
 -genkeypair         Generates a key pair      #创建密钥对
 -genseckey          Generates a secret key     #创建密钥
 -gencert            Generates certificate from a certificate request  #根据 CSR 文件创建一个证书
 -importcert         Imports a certificate or a certificate chain   #导入证书或证书链
 -importkeystore     Imports one or all entries from another keystore    #从另一个keystore导入数据
 -keypasswd          Changes the key password of an entry   #变更密码
 -list               Lists entries in a keystore   #列表显示keystore中的全部数据
 -printcert          Prints the content of a certificate   #打印证书内容
 -printcertreq       Prints the content of a certificate request   #打印证书请求文件的内容
 -printcrl           Prints the content of a CRL file  #打印已废弃证书列表的内容
 -storepasswd        Changes the store password of a keystore  #变更存储密码

Use "keytool -command_name -help" for usage of command_name

storepass: keystore文件本身也可以通过密码加密
keypass: 用于加密keystore文件中密钥的密码
entry: 指keystore文件中存储的密钥,X.509 证书链, 可信证书

2. 创建 keystore 文件

keytool -genkey -alias {{alias_name}}}  -keyalg RSA  -storepass {{store_password}}} -keystore {{file_name}}}.keystore  -keypass {{key_password}}
Paste_Image.png

3. 显示 keystore 文件的版本信息


keytool -list  -v -keystore {{file_name}}.keystore -storepass {{store_passowrd}}
Paste_Image.png

4. 使用 RFC 样式显示 keystore 文件的输出

keytool -list  -rfc  -keystore {{file_name}}.keystore -storepass {{store_passowrd}}
Paste_Image.png

相关文章

  • Keytool 证书工具使用小结

    Keytool 是密钥和证书的管理工具, 用来管理密钥,X.509 证书链, 可信证书的密钥库(数据库) 相关资料...

  • Java学习笔记01

    SpringBoot配置SSL协议 1.生成证书 使用keytool工具 输入指令 keytool -genkey...

  • keytool证书工具使用

    导出证书文件cer,可以导入到windows中 keytool -export -alias tomcat -ke...

  • Keytool工具生成SSL证书以及在Java中实现SSL

    1.Keytool工具生成SSL证书 keytool即JDK中自带的证书生成工具,常见的还有openssl工具...

  • KeyTool操作

    一、keytool的概念 keytool 是个密钥和证书管理工具。它使用户能够管理自己的公钥/私钥对及相关证书,用...

  • ionic android apk签名以及重签名

    1.使用keytool 生成数字证书 keytool是工具名称-genkey意味着执行的是生成数字证书操作 -v表...

  • KeyTool GUI 创建jks证书库

    KeyTool简介 Keytool 是一个Java数据证书的管理工具 ,Keytool将密钥(key)和证书(ce...

  • keystore 使用

    keytool keytool: JDK提供的证书生成工具(位于 JDK\bin\keytool.exe)。 命令...

  • 生成证书

    使用keytool生成证书 证书生成 服务端:keytool -genkeypair -alias server ...

  • spring boot2支持https

    1、通过Keytool先建个证书,Keytool是一个Java 数据证书的管理工具,命令如下:keytool -g...

网友评论

    本文标题:Keytool 证书工具使用小结

    本文链接:https://www.haomeiwen.com/subject/uhtgbttx.html