The following steps show how to debug iOS push connectivity across a network between the Verivo push server and the iOS back-end in the event an Apple Push Notification (APN for short) is not received by the user:
- Install OpenSSL for Windows on the push server. You can download the win32 binaries here.
- Copy the push *.p12 file to the bin folder of the newly installed OpenSSL folder (e.g., C:/OpenSSL-Win32/bin/)
- Copy the attached *.pem file to the same folder.
- Run the following commands in a command prompt:
- set OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg
- openssl pkcs12 -in <<p12 file name, e.g., ‘1006_apn_developer_identiy.p12’>> -out key.pem -nodes -clcerts
(make sure you have straight single quotes, if that is necessary, so they can copy/paste the command)
- openssl s_client -connect gateway.push.apple.com:2195 -cert key.pem -debug -showcerts -CAfile cacert.pem > debug.txt
- If you see a display of Apple’s certificate information, ending in ‘verify return:1’, along with a blinking cursor, you've successfully connected to the Apple server.
- If, on the other hand, you receive the message ‘connect: No such file or directory’ and ‘connect: errno=0’, the network is blocking communication.
The attached pem file was taken from an Internet Explorer export. It should work fine, however if Apple ever updates their certification authority, this pem file will need to get updated as well.