httpwebrequest 使用htts加密证书无证书通过方法

版权声明:本人的作品仅供研究目的,如果读者利用本人的作品从事其他行为,与本人无关 https://blog.csdn.net/oShuangYue12/article/details/52649514
  private static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
        {
           
                return true;
           
        }
        public static string DoPostParam(string url, )
        {
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);


            ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
      }
展开阅读全文

没有更多推荐了,返回首页