PUSH认证错误

时间:2014-03-26 12:55:22

标签: iphone openssl apple-push-notifications mdm

我正在尝试使用Apple推送通知服务。当我第一次安装MDM配置文件时,移动设备会向我发送设备令牌和其他一些细节,之后我无法通过任何命令联系移动设备。在移动设备上未收到推送通知。没有防火墙问题,因为我能够成功远程登录。

Apple Documentation建议我使用以下命令验证连接性

$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert YourSSLCertAndPrivateKey.pem -debug -showcerts -CAfile server-ca-cert.pem

我已经下载了server-ca-cert.pem this网站。我真的不明白什么是YourSSLCertAndPrivateKey.pem。

我使用OpenSSL创建了各种证书,如下所示。

"1. Creating Certificate Authority (CA)"
openssl req -new -x509 -extensions v3_ca -keyout cakey.key -out cacert.crt -days 365

"2. Creating the Web Server private key and certificate request"
openssl genrsa 2048 > server.key
openssl req -new -key server.key -out server.csr 

"3. Signing the server key with the CA. You'll the CA passphrase from step 1."
openssl x509 -req -days 365 -in server.csr -CA cacert.crt -CAkey cakey.key -CAcreateserial -out server.crt -extfile ./server.cnf -extensions ssl_server

"4. Creating the device Identity key and certificate request"
openssl genrsa 2048 > identity.key
openssl req -new -key identity.key -out identity.csr

"5. Signing the identity key with the CA. You'll the CA passphrase from step 1."
openssl x509 -req -days 365 -in identity.csr -CA cacert.crt -CAkey cakey.key -CAcreateserial -out identity.crt
openssl pkcs12 -export -out identity.p12 -inkey identity.key -in identity.crt -certfile cacert.crt

"6. Generating keys and certs for plist generation"
openssl req -inform pem -outform der -in identity.csr -out customer.der

Apple文档中提到的YourSSLCertAndPrivateKey.pem文件是什么?

当我使用在步骤(1-3)中创建的cacert或服务器证书时,我收到错误:14094418并且连接得到termimated,显示SSL错误48。

2 个答案:

答案 0 :(得分:1)

  

Apple文档中提到的YourSSLCertAndPrivateKey.pem文件是什么?

您必须拥有Apple开发者帐户。使用该帐户,您可以注册推送通知(它与您拥有的其他Apple开发证书不同,例如您的开发人员证书或设备证书通过配置)。您提出了CSR,并且Apple签了它。然后,您可以使用证书和私钥进行推送。

答案 1 :(得分:0)

您不应使用此命令检查MDM的工作情况。这是专为Apple推送通知服务设计的,其中将使用 gateway.sandbox.push.apple.com:2195

使用MDM gateway.push.apple.com:5223

相关问题