连接到gateway.sandbox.push.apple.com时出现“验证错误:num =

我正在尝试运行在iOS 6教程:第1/2部分的Apple Push Notification Services中找到的Ray Wenderlich教程。


我在本地目录中创建了AppID和SSL证书以及密钥和PEM文件。之后,我进入测试证书是否有效的步骤,并从此本地目录调用了以下命令:


$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 

-cert PushChatCert.pem -key PushChatKey.pem

这产生了很多输出。在输出的中间是以下内容:


verify error:num=20:unable to get local issuer certificate

verify return:0

这是错误,还是测试错误?如果是错误,将是什么原因或您将建议如何解决?


这是完整的输出(减去证书数据):


Enter pass phrase for PushChatKey.pem:    

CONNECTED(00000003)

depth=1 /C=US/O=Entrust, Inc./OU=www.entrust.net/rpa is incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Certification Authority - L1C

verify error:num=20:unable to get local issuer certificate

verify return:0

---

Certificate chain

 0 s:/C=US/ST=California/L=Cupertino/O=Apple Inc./OU=iTMS Engineering/CN=gateway.sandbox.push.apple.com

   i:/C=US/O=Entrust, Inc./OU=www.entrust.net/rpa is incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Certification Authority - L1C

 1 s:/C=US/O=Entrust, Inc./OU=www.entrust.net/rpa is incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Certification Authority - L1C

   i:/O=Entrust.net/OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Certification Authority (2048)

---

Server certificate

-----BEGIN CERTIFICATE-----


<Long string of data removed>


-----END CERTIFICATE-----

subject=/C=US/ST=California/L=Cupertino/O=Apple Inc./OU=iTMS Engineering/CN=gateway.sandbox.push.apple.com

issuer=/C=US/O=Entrust, Inc./OU=www.entrust.net/rpa is incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Certification Authority - L1C

---

No client certificate CA names sent

---

SSL handshake has read 2731 bytes and written 2215 bytes

---

New, TLSv1/SSLv3, Cipher is AES256-SHA

Server public key is 2048 bit

Secure Renegotiation IS supported

Compression: NONE

Expansion: NONE


该教程继续说:“如果连接成功,您应该可以输入几个字符。按Enter键时,服务器应该断开连接。” 我能够做到这一点,并且服务器已断开连接。


但是本教程继续说,您可能必须查看输出以发现错误。因此,这个问题的原因。


扬帆大鱼
浏览 1708回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP