对于 SSL3.0 的安全问题,APNS 将删除对 SSL3.0 的支持,然后所有仅支持 SSL3.0 的提供商现在都需要支持 TLS。就我而言,我使用的 PHP 提供程序设置如下:
...
stream_context_set_option($ctx, 'ssl', 'local_cert', $certFilePath);
stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
stream_context_set_option($ctx, 'ssl', 'cafile', 'entrust_2048_ca.cer');
$apnsServiceLocation = 'ssl://gateway.push.apple.com:2195';
...
我发现解决方案只是修改了APNS服务的url:
$apnsServiceLocation = 'tls://gateway.push.apple.com:2195';