I am using php script for push notification in my application. But in the next line
$fp = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);"
Where
$ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');
I get an error as follows:
Warning: stream_socket_client (): SSL operation failed with code 1.
OpenSSL error messages: error: 14094416: SSL routines: SSL3_READ_BYTES: sslv3 warning certificate unknown in /Users/amit/Desktop/NotificationFolder/apns.php on line 29
Warning: stream_socket_client (): Failed to enable cryptography in /Users/amit/Desktop/NotificationFolder/apns.php on line 29
Warning: stream_socket_client (): cannot connect to ssl: //gateway.sandbox.push.apple.com: 2195 (Unknown error) in /Users/amit/Desktop/NotificationFolder/apns.php on line 29
Failed to connect 0
Does anyone know how to get rid of this problem? Everything works fine next to him.
source share