rs / pushd

Blazing fast multi-protocol mobile and web push notification service
MIT License
1.16k stars 224 forks source link

IOS certificate confusion #142

Open mattwoberts opened 8 years ago

mattwoberts commented 8 years ago

Hi guys. First - apologies if this is a user error, which I suspect it may be...

I can't for the life of me, get this working with APNS, and it's driving me mad. I'm getting an error code 8 from APNS - which is an invalid token, which would suggest that my .pem files are wrong.

I've generated a developement certificate for APS notifications, and then exported that to a .p12. I ran the openssl commands to convert them to .pem files, and I've specified those in the pushd config. I've also configured the gateway and feedback URLs to use the sandbox.

Could you suggest any next steps I can take to look at this? I found an article (http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1) that suggests using telnet to verify connection to the sandbox - this doesn't work for me - here's the error:

$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert MyCert.pem -key MyKey.pem

Enter pass phrase for MyKey.pem:
error setting private key
8457:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59/src/crypto/x509/x509_cmp.c:406:

Any help appreciated - I'm totally stuck on this :(

munchios1 commented 8 years ago

I have same issue. and I stuck too.