开发者

apple push notification connection issue - key value mismatch check private key message

I'm trying to test push notifications for my app, but can't connect to the apple sandbox with my certificate and private key. I'm following this tutorial.

I set up a new certificate and app id per the tutorial, set up a private key, and generated the .pem files for the certificate and the private key:

openssl x509 -in aps_developer_identity.cer -inform der -out PushTestCert.pem
openssl pkcs12 -nocerts -out PushTestKey.pem -in PushTestKey.p12 

For the private key, it asks me to enter the original password the key,开发者_开发百科 as well as a new one. I used the same password.

Then I test the connection to apple and am prompted for my password, and I enter the new password for the key .pem file, which is the same as the old password:

openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert PushTestCert.pem -key PushTestKey.pem
Enter pass phrase for PushTestKey.pem:
error setting private key
59244:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:/SourceCache/OpenSSL098/OpenSSL098-35.1/src/crypto/x509/x509_cmp.c:406:

Is there something I'm missing? On the iOS provisioning portal my app id says it is enabled for development (push). I've tried re-downloading the openssl certificate, no cigar.


Just to follow up, the reason this is probably happening is that you did not use the new public key to generate a push notification certificate for your app in developer.apple.com. So it can't match, because you private key does not match the public key used to generate the push notification cert


Is private key encryption a must? If not, try removing encryption, like so: openssl rsa -in PushTestKey.pem -out PushTestKey.unencrypted.pem


I reset my login keychain and started from zero on the ios provisioning portal. I think I had an extra key somewhere that was interfering.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜