开发者

Accept any certificate for SSL

开发者 https://www.devze.com 2022-12-28 09:24 出处:网络
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?

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

精彩评论

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