我正在嘗試運(yùn)行在iOS 6教程:第1/2部分的Apple Push Notification Services中找到的Ray Wenderlich教程。我在本地目錄中創(chuàng)建了AppID和SSL證書以及密鑰和PEM文件。之后,我進(jìn)入測試證書是否有效的步驟,并從此本地目錄調(diào)用了以下命令:$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert PushChatCert.pem -key PushChatKey.pem這產(chǎn)生了很多輸出。在輸出的中間是以下內(nèi)容:verify error:num=20:unable to get local issuer certificateverify return:0這是錯(cuò)誤,還是測試錯(cuò)誤?如果是錯(cuò)誤,將是什么原因或您將建議如何解決?這是完整的輸出(減去證書數(shù)據(jù)):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 - L1Cverify error:num=20:unable to get local issuer certificateverify 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.comissuer=/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-SHAServer public key is 2048 bitSecure Renegotiation IS supportedCompression: NONEExpansion: NONE該教程繼續(xù)說:“如果連接成功,您應(yīng)該可以輸入幾個(gè)字符。按Enter鍵時(shí),服務(wù)器應(yīng)該斷開連接?!?我能夠做到這一點(diǎn),并且服務(wù)器已斷開連接。但是本教程繼續(xù)說,您可能必須查看輸出以發(fā)現(xiàn)錯(cuò)誤。因此,這個(gè)問題的原因。
連接到gateway.sandbox.push.apple.com時(shí)出現(xiàn)“驗(yàn)證錯(cuò)誤:num =
揚(yáng)帆大魚
2019-11-26 12:55:47