APNS + PHP “stream_socket_client(): Failed to enable crypto”

前端 未结 8 2081
醉酒成梦
醉酒成梦 2020-12-14 09:33

I\'m having trouble with using APNS with PHP and getting the following message:

stream_socket_client(): Failed to enable crypto

The problem

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 09:59

    I tried examples from book of Marin Todorov iOs 6 by Tutorials. And before I could send push notifications for automatical update I had a lot of headache cause of handshake error - stream_socket_client(): Failed to enable crypto.

    I did all of what I found in Stackoverflow - changed permissions on certificate and others.

    What I did eventually?

    I created selfsigned SSL certificate and setup Apache for serving SSL.
    Also I changed SSL protocol from ssl to tls in hostname:

    tls://gateway.push.apple.com:2195
    

    After that service works.

提交回复
热议问题