New test:
Did a cURL command directly:
curl -v -d '{"aps":{"alert":"Test notification"}}'
--http2
--cert /home/s1005325/aps.pem
--key /home/s1005325/AuthKey_M96BF5U2GG.pem
-H "apns-topic: GridQ.com.HeartConnect"
-H "authorization: bearer $AUTHENTICATION_TOKEN"
-H "apns-push-type: alert"
-H "apns-priority: 10"
-H "apns-expiration: 0"
https://api.sandbox.push.apple.com/3/device/5923f196cadac44cc7a9add6707b4092fb8060c04635a28be8419a59212108e3
Result:
Trying 17.188.168.149:443...
Connected to api.sandbox.push.apple.com (17.188.168.149) port 443 (#0)
ALPN, offering h2
ALPN, offering http/1.1
unable to set private key file: '/home/s1005325/AuthKey_M96BF5U2GG.pem' type PEM
Closing connection 0
curl: (58) unable to set private key file: '/home/s1005325/AuthKey_M96BF5U2GG.pem' type PEM
Have tested the AuthKey_M96BF5U2GG.pem. It is in a valid RSA format. The permissions and owner are correct.
The .p8 file it was generated from worked to connect to APN from the command line.
Topic:
App & System Services
SubTopic:
Notifications
Tags: