Getting stuck with Creating .p12 push certificate file for Bluemix push

元气小坏坏 提交于 2019-12-25 08:18:19

问题


With reference to this post: Devices being unregistered after push is sent, I have the same issue - my iPhone device is unregistered after sent a push notification. I tried the suggestion from that post, and I did this with my certificates:

-ios_development.cer - Development profile downloaded from Apple 
-Certificates.p12 - APNS .p12 exported from the keychain 

-openssl x509 -in ios_development.cer -inform DER -out apns.pem -outform PEM
-openssl pkcs12 -nocerts -in Certificates.p12 -out Certificates.pem  
-openssl pkcs12 -export -inkey Certificates.pem -in apns.pem -out bluemixPush_dev.p12

and I got this error:

unable to load private key
97354:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/crypto/evp/evp_enc.c:330:
97354:error:0906A065:PEM routines:PEM_do_header:bad decrypt:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-59.40.2/src/crypto/pem/pem_lib.c:428:

Is anyone having the same issue?


回答1:


@Jan As your private key is wrong, you are getting that error. Please follow the steps mentioned in the below link to create a .p12 certificate.

https://console.ng.bluemix.net/docs/services/mobilepush/t_push_provider_ios.html#create-push-credentials-apns-ssl



来源:https://stackoverflow.com/questions/38840014/getting-stuck-with-creating-p12-push-certificate-file-for-bluemix-push

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!