keytool使用方法

     keytool 是个密钥和证书管理工具。它使用户能够管理自己的公钥/私钥对及相关证书,用于(通过数字签名)自我认证(用户向别的用户/服务认证自己)或数据完整性以及认证服务。在JDK 1.4以后的版本中都包含了这一工具,它的位置为%JAVA_HOME%\bin\keytool.exe

   

 

1.生成证书

keytool -genkeypair -keyalg RSA -keysize 1024 -sigalg MD5withRSA -validity 365 -alias www.smed.net -keystore lxh.keystore
2.导出证书
keytool -exportcert -alias www.smed.net -keystore lxh.keystore -file lxh.cer -rfc
3.打印证书
keytool -printcert -file lxh.cer
4.生成证书请求
keytool -certreq -alias www.smed.net -keystore lxh.keystore -file lxh.csr -v
5.列出证书清单
keytool -list -alias www.smed.net -keystore lxh.keystore

keytool -list -keystore lxh.keystore
6.导入证书
keytool -importcert -trustcacerts -alias www.smed.net -file lxh.cer -keystore lxh.keystore

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值