Unable to load client certificate private key file

空扰寡人 提交于 2020-01-25 05:51:30

问题


I am unable to create Apple Push Notification cert files. When I test .pem files I get an error.

openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert pushapp_cert_dev.pem -key pushapp_key_dev.pem

will give an error:

unable to load client certificate private key file 140735327015760:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: ANY PRIVATE KEY

I am following these instructions: https://github.com/raix/push/wiki/iOS-Micro-Walkthrough

pushapp_cert_dev.pem

-----BEGIN CERTIFICATE-----
MIIFiTCCBHGgAw...ff6eVQDZV4=
-----END CERTIFICATE-----

pushapp_key_dev.pem

Bag Attributes
    friendlyName: pushApp
    localKeyID: EB 91 B3 CD A0 F5 9A 56 46 96 43 24 C8 B0 A7 56 62 01 9E 2C 
Key Attributes: <No Attributes>

Both files are in the same location.


回答1:


When I created the .pem file, I simply needed to enter passphrase (min 4 char) when prompted. First, I just skipped it because I didn't want to create passphrase. It doesn't give any error or otherwise inform that passphrase is required and it actually creates a non working .pem file.



来源:https://stackoverflow.com/questions/28022156/unable-to-load-client-certificate-private-key-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!