我尝试使用Pusher将通知添加到我的iOS应用程序中。当我向服务器发送设备令牌时,我会发出以下问题:
Bad HTTP response: <NSHTTPURLResponse: 0x174032be0> { URL: https://nativepushclient-cluster1.pusher.com/client_api/v1/clients } { status code: 401, headers {
Connection = "keep-alive";
"Content-Length" = 125;
"Content-Type" = "application/json";
Date = "Thu, 09 Mar 2017 10:12:22 GMT";
Server = Cowboy;
Via = "1.1 vegur"; } } with body: Optional("{\"error\":\"Invalid application credentials for apns\",\"desc\":\"Unable to read your certificate: failed to decrypt private key\"}\n")“{\”error\“:\”apns的无效应用程序凭据“”,\“desc\”:“无法读取证书:无法解密私钥\”
任何想法都会受到强烈的赞赏!(我确实将我的证书.p12转换为.pem (证书+密钥在一个文件中,应该创建两个文件吗?)
我做到了:
openssl pkcs12 -in path.p12 -out newfile.pem
我应该这么做吗?
openssl pkcs12 -in path.p12 -out newfile.crt.pem -clcerts -nokeys openssl -in path.p12 -out newfile.key.pem -nocerts -nodes
非常感谢!
发布于 2017-03-09 18:29:15
我使用了来自https://github.com/nomad/houston的教程
$ openssl pkcs12 -in cert.p12 -out apple_push_notification.pem -nodes -clcertshttps://stackoverflow.com/questions/42692680
复制相似问题