Techioz Blog

openssl pkcs12 -export は証明書をロードできないというエラーを返します

概要

今日まで、私は以下の手順に従ってプッシュ用の p12 ファイルを作成していました。

openssl x509 -in aps_development.cer -inform DER -out aps_development_identity.pem -outform PEM}
openssl pkcs12 -nocerts -out private_development_key.pem -in Certificates.p12
openssl rsa -out private_key_noenc.pem -in private_development_key.pem
openssl pkcs12 -export -in aps_development_identity.pem -inkey private_key_noenc.pem -certfile CertificateSigningRequest.certSigningRequest -name "aps_development_identity" -out aps_development_identity.p12

注 : 私のフォルダーには、aps_development.cer、Certificates.p12、CertificateSigningRequest.certSigningRequest がすでにあります。

しかし、今日、ターミナルで最後のステートメントを実行するとエラーが発生しました。

最後の文を実行すると、以下のようなエラーが発生します。

openssl pkcs12 -export -in aps_development_identity.pem -inkey private_key_noenc.pem -certfile CertificateSigningRequest.certSigningRequest -name "aps_development_identity" -out aps_development_identity.p12

unable to load certificates --> this is what I get in response

今までこのようなエラーは発生しませんでした。

私に何が欠けているのか何か考えがあります。

ポッドの Ruby を更新したためにこれが起こっているのだと思いました。

このエクスポートに関して Ruby で何か更新されたものはありますか?

解決策

最後に解決策を見つけました。

openssl pkcs12 -export -in aps_development_identity.pem -inkey private_key_noenc.pem -name "aps_development_identity" -out aps_development_identity.p12

最後のステートメントから -certfile CertificateSigningRequest.certSigningRequest を削除するだけで完了です。