首先创建证书
X509Certificate2 certificate = new X509Certificate2(System.IO.File.ReadAllBytes("证书路径"),"证书密码");
X509CertificateCollection certificates = new X509CertificateCollection();
certificates.Add(certificate);然后建立连接
TcpClient apnsClient = new TcpClient("gateway.sandbox.push.apple.com", 2195);SslStream apnsStream = new SslStream(apnsClient.GetStream(),  
                        true,
                        new RemoteCertificateValidationCallback(validateServerCertificate),
      new LocalCertificateSelectionCallback(selectLocalCertificate);
这里抛出错误
apnsStream.AuthenticateAsClient("gateway.sandbox.push.apple.com",
                         certificates,
                         System.Security.Authentication.SslProtocols.Ssl3,
                         false);调用 SSPI 失败,请参见内部异常。请问这是什么原因?IOS推送