我試圖用簡單的PHP工具,它連接到ssl://gateway.push.apple.com:2195
送我的手機推送通知,但連接失敗,出現以下錯誤:的APN推送通知和MacOS塞拉利昂
Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in <Users/.../file.php> on line 30
Warning: stream_socket_client(): Failed to enable crypto in <Users/.../file.php> on line 30
Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in <Users/.../file.php> on line 30
Failed to connect: 0
,因爲這一切都開始我升級爲macOS Sierra的轉基因種子。 macOS Sierra中有哪些新特性影響SSL連接? 我該如何解決這個問題?
首先你嘗試檢查推送通知的憑證檔案錯誤使用一些APNS測試儀的工作,如果你得到那麼所有的通知如果沒有,那麼你必須從兩邊檢查。您可以使用此網站進行測試http://pushtry.com/ – ashmi123
完全相同的文件夾(具有證書等)在OS X Mavericks中運行良好,但在macOS Sierra中運行得並不理想。我認爲基本上問題是找到證書('.pem')文件的路徑。我試圖提供絕對路徑以及相對路徑,並且都沒有嘗試過。 –
你有沒有嘗試使用這個網站? – ashmi123