swift - 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
直到现在我还没有收到这样的错误。
知道我错过了什么。
我将 Swift 标记为 iOS 开发人员可能遇到过这个问题。所以我只是添加了 Swift 标签来将它们带入这个问题。
我只是认为这是因为我更新了 Ruby for pods。
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
从最后一条语句中删除即可。
推荐阅读
- sdk - Genexus Extensions SDK - 我在哪里可以找到可用的菜单上下文字符串?
- json - 解析 JSON 错误无法读取未定义的属性“url”
- python - 在 Pandas 中按顺序重命名重复的列名
- r - 将带有月份编号的日期转换为带有月份缩写的日期?
- html - 如何在两个 iframe 之间创建通信?
- mongodb - mongodb 在身份验证启用模式下不要求身份验证
- python - --all 标志对 conda env 删除有什么作用?
- laravel - Laravel Nova - 删除相应的数据库条目后如何从磁盘中删除图像?
- java - 如何将文件夹、资源和 pom 文件从 maven 项目获取到另一个 maven 项目?
- java - 使用 java 注解创建局部变量