没有合适的资源?快使用搜索试试~ 我知道了~
[PKI]常见证书格式和转换
3星 · 超过75%的资源 需积分: 10 14 下载量 129 浏览量
2010-06-11
11:55:54
上传
评论
收藏 31KB DOC 举报
温馨提示
试读
1页
[PKI]常见证书格式和转换[PKI]常见证书格式和转换[PKI]常见证书格式和转换[PKI]常见证书格式和转换[PKI]常见证书格式和转换[PKI]常见证书格式和转换[PKI]常见证书格式和转换
资源推荐
资源详情
资源评论
[PKI] 常见证书格式和转换
PKCS 全称是 Public-Key Cryptography Standards ,是由 RSA 实验室与其它安全系统开
发商为促进公钥密码的发展而制订的一系列标准,PKCS 目前共发布过 15 个标准。 常用的有:
PKCS#7 Cryptographic Message Syntax Standard
PKCS#10 Certi!cation Request Standard
PKCS#12 Personal Information Exchange Syntax Standard
X.509 是常见通用的证书格式。所有的证书都符合为 Public Key Infrastructure (PKI) 制定
的 ITU-T X509 国际标准。
PKCS#7 常用的后缀是: .P7B .P7C .SPC
PKCS#12 常用的后缀有: .P12 .PFX
X.509 DER 编码(ASCII)的后缀是: .DER .CER .CRT
X.509 PAM 编码(Base64)的后缀是: .PEM .CER .CRT
.cer/.crt 是用于存放证书,它是 2 进制形式存放的,不含私钥。
.pem 跟 crt/cer 的区别是它以 Ascii 来表示。
pfx/p12 用于存放个人证书/私钥,他通常包含保护密码,2 进制方式
p10 是证书请求
p7r 是 CA 对证书请求的回复,只用于导入
p7b 以树状展示证书链(certi!cate chain),同时也支持单个证书,不含私钥。
一 用 openssl 创建 CA 证书的 RSA 密钥(PEM 格式):
openssl genrsa -des3 -out ca.key 1024
二用 openssl 创建 CA 证书(PEM 格式,假如有效期为一年):
openssl req -new -x509 -days 365 -key ca.key -out ca.crt -con!g openssl.cnf
openssl 是可以生成 DER 格式的 CA 证书的,最好用 IE 将 PEM 格式的 CA 证书转换成 DER 格
式的 CA 证书。
三 x509 到 pfx
pkcs12 -export –in keys/client1.crt -inkey keys/client1.key -out keys/client1.pfx
四 PEM 格式的 ca.key 转换为 Microsoft 可以识别的 pvk 格式。
; pvk -in ca.key -out ca.pvk -nocrypt -topvk
五 PKCS#12 到 PEM 的转换
openssl pkcs12 -nocerts -nodes -in cert.p12 -out private.pem
验证 openssl pkcs12 -clcerts -nokeys -in cert.p12 -out cert.pem
六 从 PFX 格式文件中提取私钥格式文件 (.key)
openssl pkcs12 -in mycert.pfx -nocerts -nodes -out mycert.key
七 转换 pem 到到 spc
openssl crl2pkcs7 -nocrl -cert!le venus.pem; -outform DER -out venus.spc
用 -outform -inform 指定 DER 还是 PAM 格式。例如:
openssl x509 -in Cert.pem -inform PEM -out cert.der -outform DER
八 PEM 到 PKCS#12 的转换,
openssl pkcs12 -export -in Cert.pem -out Cert.p12 -inkey key.pem
资源评论
- hxbiao2011-12-30word文档,还以为是转换程序。
alvindong
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功