开发者

Accept any certificate for SSL

I have small TcpClient app to connect to a server using SSL (SSlStream class)

My question is, how to accept any ssl certification when co开发者_StackOverflow中文版nnecting?

Thanks,


public static bool RemoteCertificateValidationCallback(object sender, 
    X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) 
{
    return true;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜