Reputation: 1079
I have created a .pem file to be used for Production push notification,
and uploaded in server.
But when sending push notification, it is giving error like this.
$fp = stream_socket_client('ssl://gateway.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx); not working, return failed.
what is this error, how to solve it.
Finally, how to know whether the .pem file is correct or not
Upvotes: 3
Views: 1765
Reputation: 70158
You could use "certtool" from the GnuTLS binaries to validate the certificate (certtool -i --infile cert.pem
). Windows binaries are also available.
I don't have an answer for your stream_socket_client
problem. Make sure the context is initialized correctly, an example is shown in the documentation.
Upvotes: 3