我尝试生成PEM文件,但无法生成它。最后出现此错误。提取物p12包含私钥
PEM例程:CRYPTO_internal:无法启动 行:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.200.4/libressl-2.6/crypto/pem/pem_lib.c:683:期望: 任何私钥
这是我触发以生成PEM文件的命令
1. openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
2. openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
3. openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem //Not able to execute this command
我尝试进行研发以解决此错误,并从here中找到一种解决方案 但无法理解我需要在这两行添加
I changed the header and footer of the PEM file to
-----BEGIN RSA PRIVATE KEY-----
and
-----END RSA PRIVATE KEY-----
Finally, it works!