【发布时间】:2013-08-22 07:12:12
【问题描述】:
我正在尝试使用以下命令测试我的服务器与 Apple 的沙盒 APNS 服务器之间的连接:
$ openssl s_client -connect gateway.sandbox.apple.com:2195 -cert cert.pem -key key.pem
Enter pass phrase for key.pem:
gethostbyname failure
connect:errno=0
gethostbyname failure是什么意思,是什么原因?
在同一台服务器上,telnet 到 2195 端口工作正常:
$ telnet gateway.push.apple.com 2195
Trying 17.149.36.242...
Connected to gateway.push-apple.com.akadns.net.
Escape character is '^]'.
更新:如果我使用 IP 而不是主机名,它可以正常工作:
$ openssl s_client -connect 17.149.36.242:2195 -cert cert.pem -key key.pem
OpenSSL 无法解析 DNS ?
【问题讨论】:
标签: ios openssl push-notification apple-push-notifications