无法从.p12(私钥+公钥)创建.pem文件 [英] Unable to create .pem file from .p12 (private key + public key)

查看:131
本文介绍了无法从.p12(私钥+公钥)创建.pem文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下命令从.p12文件创建.pem文件

I am trying to create .pem file from .p12 file with below command,

openssl x509 -inform der -in Certificates.p12 -out Certificates.pem

但出现以下错误:

4412094060:error:0DFFF0A8:asn1 encoding routines:CRYPTO_internal:wrong tag:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/crypto/asn1/tasn_dec.c:1125:
4412094060:error:0DFFF03A:asn1 encoding routines:CRYPTO_internal:nested asn1 error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/crypto/asn1/tasn_dec.c:306:Type=X509_CINF
4412094060:error:0DFFF03A:asn1 encoding routines:CRYPTO_internal:nested asn1 error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/crypto/asn1/tasn_dec.c:627:Field=cert_info, Type=X509

知道如何解决吗?

推荐答案

以下命令运行正常,

openssl pkcs12 -in Certificates.p12 -out Certificates.pem -nodes -clcerts

这篇关于无法从.p12(私钥+公钥)创建.pem文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆