我遵循了这份文件:
https://developer.zendesk.com/embeddables/docs/ios-chat-sdk/push_notifications
并结合了证书PEM和密钥PEM。
我使用了openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert Certificates.pem -key PrivateKey.pem
openssl s_client-连接gateway.sandbox.push.apple.com:2195 -cert Certificates.pem -key PrivateKey.pem
CONNECTED(00000007)深度= 1 C =美国,O =“ Entrust,Inc。”,OU =请参见 www.entrust.net/legal-terms,OU =“(c)2012 Entrust,Inc.-用于 仅授权使用”,CN =委托证书颁发机构-L1K 验证错误:num = 20:无法获取本地发行者证书 返回:0 -证书链0 s:/ C = US / ST = California / L = Cupertino / O = Apple Inc./CN=gateway.sandbox.push.apple.com i:/ C = US / O = Entrust, Inc./OU=请参见www.entrust.net/legal-terms/OU=(c)2012 Entrust,Inc.- 仅供授权使用/ CN =委托证书颁发机构-L1K 1 s:/ C = US / O = Entrust,Inc./OU=请参阅www.entrust.net/legal-terms/OU=(c)2012 Entrust,Inc.-仅供授权使用/ CN = Entrust认证 权限-L1K i:/O=Entrust.net/OU=www.entrust.net/CPS_2048 公司通过参考(限制限制)/ OU =(c)1999 Entrust.net Limited / CN = Entrust.net认证中心(2048) ---服务器证书 ----- BEGIN证书----- MIIHSDCCBjCgAwIBAgIQWxjih7 / N45IAAAAAUOIMDDANBgkqhkiG9w0BAQsFADCB ujELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsT H1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAy MDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEuMCwG A1UEAxMlRW50cnVzdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEwxSzAeFw0x ODA0MjQwMjUyNTNaFw0yMDA0MjAwMzIyNTJaMHQxCzAJBgNVBAYTAlVTMRMwEQYD VQQIEwpDYWxpZm9ybmlhMRIwE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I svstJ / uaLlTbeUkAdQCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jjd80OyA3cEAAA AWL1rO2HAAAEAwBGMEQCIGUEnyBQyHZ / JaJ9LRQqqqQ0h2Ez9fzqhIaHk6nO4lYnf AiBeuRikWxw8yuYkXd + n0i97cagfVDoi1AHRitCvk8zUmTAOBgNVHQ8BAf8EBAMC BaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMDMGA1UdHwQsMCowKKAm oCSGImh0dHA6Ly9jcmwuZW50cnVzdC5uZXQvvGG2ZWwxay5jcmwwSwYDVR0gBEQw QjA2BgpghkgBhvpsCgEFMCgwJgYIKwYBBQUHAgEWGmh0dHA6Ly93d3cuZW50cnVz dC5uZXQvcnBhMAgGBmeBDAECAjBoBggrBgEFBQcBAQRcMFowIwYIKwYBBQUHMAGG F2h0dHA6Ly9vY3NwLmVudHJ1c3QubmV0MDMGCCsGAQUFBzAChidodHRwOi8vYWlh LmVudHJ1c3QubmV0L2wxay1jaGFpbjI1Ni5jZXIwHwYDVR0jBBgwFoAUgqJwdN28 Uz / Pe9T3zX + nYMYKTL8wHQYDVR0OBBYEFER7zAX8nlMJjpQL8PV9MYeeWpMOMAkG A1UdEwQCMAAwDQYJKoZIhvcNAQELBQADggEBAJGeRI1Wht6YTfvdz2wKmZS8TFpX gBRUUUNFFG0ihXuK48XKkKJviKikWl + qvExZqQN44aaIB5CHDgwUL6udQDZg7E27 rdC72tL79zHWbt / ukm6ffGa9SIIwtcJh + apfSA2YI5cmS9Da5v12VTkKizumgGVQ pxP3EPnriAaj93BLVou5IUmuXOAbFqB2ZfhaX3kyiB + Hj87DGIU6qW8LnmKL22xi 77ksB4zbOm3FK71xwEOpakcC7rLbivRuB1iBV2TggXWvPf5snTV3jRTi8Cmqam4A S + 74TbYXfUQHBWIRQMktF + I / N9camXrf9ZfFTPzCO9GD6hbl6ae // zWDhh0 = ----- END CERTIFICATE ----- subject = / C = US / ST = California / L = Cupertino / O = Apple Inc./CN=gateway.sandbox.push.apple.com发行者= / C = US / O =委托, Inc./OU=请参见www.entrust.net/legal-terms/OU=(c)2012 Entrust,Inc.- 仅供授权使用/ CN =委托证书颁发机构-L1K ---可接受的客户证书CA名称/ C = US / O = Apple Inc./OU=Apple证书颁发机构/ CN = Apple根CA / C = US / O = Apple Inc./OU=Apple 全球开发人员关系/ CN = Apple全球开发人员关系 认证中心/ CN = Apple应用程序集成2 证书颁发机构/ OU = Apple证书颁发机构/ O = Apple Inc./C=美国/ C = US / ST = CA / L = Cupertino / O = Apple Inc./OU=Internet软件 和服务/ CN = iCloud测试/电子邮件地址=APNS-Dev@group.apple.com / C = US / ST = California / L = Cupertino / O = Apple Inc./CN=gateway.sandbox.push.apple.com / C = US / O = Apple Inc./OU=Apple 认证中心/ CN = Apple应用程序集成认证 权威 -SSL握手已读取4165个字节并写入2411个字节 ---新增功能,TLSv1 / SSLv3,密码为DES-CBC3-SHA服务器公共密钥为2048位,支持安全重新协商压缩:无扩展: 无没有ALPN协商SSL会话: 通讯协定:TLSv1.2 密码:DES-CBC3-SHA 会话ID: 会话ID-ctx: 万能钥匙:947F3D735AEEFB1633D0E18CD8CAFF5F6AB789DC518AEED4913382554437C2EE686F50A9267B285E798AB40FAEC389FD 开始时间:1552990882 超时:7200(秒)
验证返回码:0(确定)
然后我成功上传到Zendesk Dashboard。但是之后,我无法收到推送通知。