无法为Bluemix推送

时间:2016-08-08 23:38:54

标签: ios ssl encryption ibm-cloud ibm-mobile-services

参考这篇文章:Devices being unregistered after push is sent,我遇到同样的问题 - 发送推送通知后我的iPhone设备未注册。我尝试了那篇文章的建议,我用我的证书做了这个:

-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

我收到了这个错误:

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:

是否有人遇到同样的问题?

1 个答案:

答案 0 :(得分:1)

@Jan由于您的私钥错误,您将收到该错误。请按照以下链接中提到的步骤创建.p12证书。

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

Create the .p12 push certificate file for Bluemix push