私のアプリケーションでプッシュ通知にphpスクリプトを使用しています。しかし、次のように行プッシュ通知接続エラー
$fp = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT, $ctx);"
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');
を次のように私はエラーを取得する:
Warning: stream_socket_client(): SSL operation failed with code 1.
OpenSSL Error messages: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown in /Users/amit/Desktop/NotificationFolder/apns.php on line 29Warning: stream_socket_client(): Failed to enable crypto in /Users/amit/Desktop/NotificationFolder/apns.php on line 29
Warning: stream_socket_client(): unable to 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
いずれかがこの問題を取り除くためにどのように知っていますか? それだけでは問題ありません。
また、[gateway.sandbox.push.apple.comに接続すると["verify error:num = 20"(http://stackoverflow.com/a/23351633/608639)を参照してください。 3つのことを確認する必要があります。(1)TLS 1.0以上。 (2)サーバ・ナンバー表示; (3)* Entrust.net Certification Authority(2048)*ルート。 – jww