Невозможно создать файл .pem из .p12 (закрытый ключ + ключ publi c) - PullRequest
0 голосов
/ 19 марта 2020

Я пытаюсь создать .pem файл из .p12 файла с помощью команды ниже,

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

Любая идея, как решить это?

1 Ответ

0 голосов
/ 19 марта 2020

Команда ниже работала нормально,

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