加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

crt key转p12, jks p12互转,windows生成jks,

发布时间:2020-12-14 02:31:10 所属栏目:Windows 来源:网络整理
导读:crt key转p12,jks p12互转,windows生成jks, 摘自:https://blog.csdn.net/u010801696/article/details/86546191 2019年01月18日 20:44:25?algondon? 阅读数:22 ? 版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010801696/a

crt key转p12,jks p12互转,windows生成jks,

摘自:https://blog.csdn.net/u010801696/article/details/86546191

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010801696/article/details/86546191

crt转为p12证书

openssl pkcs12 -export -in client.crt -inkey client.key -out iot.p12 -name "iot"?

jks p12互转

keytool -importkeystore -srckeystore iot.p12 -srcstoretype PKCS12 -deststoretype JKS -destkeystore iot.jks

keytool -importkeystore -srckeystore iot.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore iot.p12

windows生成jks

生成jks文件

keytool?-genkeypair?-alias?icesslkey?-keyalg?RSA?-validity?3650?-keystore?icekeystore.jks

RSA是非对称密钥算法,可改为keytool其他算法,365代表证书的有效期10年

查看生成的jks文件信息

keytool -list -v -keystore icekeystore.jks

导出公钥证书

keytool -export -alias icesslkey -keystore icekeystore.jks -rfc -file icecert.cer

icecert.cer为导出的证书名字

将证书导入到truststore

keytool -import -v -trustcacerts -alias icesslkey -file icecert.cer -keystore icetruststore.ts

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读