Java https ssl证书导入删除

下载并命名 例如命名github.cer 放进jre的lib\security下

keytool -delete [OPTION]...

选项:

 -alias <alias>                  要处理的条目的别名
 -keystore <keystore>            密钥库名称
 -storepass <arg>                密钥库口令
 -storetype <storetype>          密钥库类型
 -providername <providername>    提供方名称
 -providerclass <providerclass>  提供方类名
 -providerarg <arg>              提供方参数
 -providerpath <pathlist>        提供方类路径
 -v                              详细输出
 -protected                      通过受保护的机制的口令



命令:

 -certreq            生成证书请求
 -changealias        更改条目的别名
 -delete             删除条目
 -exportcert         导出证书
 -genkeypair         生成密钥对
 -genseckey          生成密钥
 -gencert            根据证书请求生成证书
 -importcert         导入证书或证书链
 -importpass         导入口令
 -importkeystore     从其他密钥库导入一个或所有条目
 -keypasswd          更改条目的密钥口令
 -list               列出密钥库中的条目
 -printcert          打印证书内容
 -printcertreq       打印证书请求的内容
 -printcrl           打印 CRL 文件的内容
 -storepasswd        更改密钥库的存储口令

 

导入

keytool -import -keystore "G:\java\jre1.8.0_102\lib\security\github" -file github.cer -alias git

删除
keytool -delete -alias git -keystore "G:\java\jre1.8.0_102\lib\security\github" -storepass changeit

 

posted on 2018-03-20 11:52  Honey_Badger  阅读(1809)  评论(0编辑  收藏  举报

导航

github