我们的服务遍布中国

我们的服务遍布中国
乃至世界

光网所服务的品牌地域与城市
北京 天津 上海 广州 深圳 香港 厦门 江苏 浙江 山东
重庆 长沙 武汉 成都 西安 宁夏 丽江 青海 云南 乌鲁木齐
黑龙江 内蒙古 河北 ...
光网服务与合作的全球各地
美国 加拿大 德国 法国 英国 瑞士 意大利 荷兰
印度 日本 韩国 ...

不论你的品牌在何处
我们都可以提供完善的服务与帮助

致电

0512-56969630
您所在的位置:首页 > SSL证书

OpenSSL 命令使用教程

发布时间:2017/3/12 19:34:07 浏览:80打印字号:

获取证书 Public key

openssl rsa -in certificate.pem -out publickey.pem -outform PEM -pubout

生成自签名证书

openssl req -nodes -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 356

删除私钥(KEY)密码

openssl rsa -in private.key -out unencrypted.key -outform PEM

生成带密码的私钥

openssl genrsa -des3 -out private.key 2048

使用带密码的私钥生成CSR

openssl req -new -passin pass:密码 -passout pass:密码 -key private.key -out server.csr获取证书HASH
openssl x509 -noout -hash -in newcert.pem

PEM格式转DER

openssl x509 -outform der -in certificate.pem -out certificate.der

PEM格式转成P7B

openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer

PEM格式转成PFX
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt

DER格式转PEM

openssl x509 -inform der -in certificate.cer -out certificate.pem

P7B格式转成PEM

openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer

P7B格式转成PFX

openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer

PFX格式转成PEM

openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes

证书解码

openssl x509 -in certificate.crt -text -noout

PFX导出私钥

openssl pkcs12 -in domain.com.pfx -nocerts -out privateKey.pem

PRIVATE KEY 转成 RSA PRIVATE KEY

openssl rsa -in domain.key -out domain-rsa.key