title: How to ignore SSL certificate validation in .Net-Core 2 on CentOS
body: <p>I'm building a console application using <strong>.NetCore 2.0</strong></p>
  
  <p>This application is making a REST call for a server which running on <strong>"https" but his certificate is not valid.</strong> To support this issue I override the "<strong>ServerCertificateCustomValidationCallback</strong>" function:</p>
  
  <pre><code>        HttpClientHandler httpClientHandler;
  
          if (IgnoreSslErrors)
          {
              httpClientHandler = new HttpClientHandler
              {
                  ServerCertificateCustomValidationCallback = (message, certificate2, chain, errors) =&gt;
                  {
                      Log.Warn($"Invalid SSL/TLS server certificate: {errors}");
                      return true;
                  }
              };
          }
          else
          {
              httpClientHandler = new HttpClientHandler();
          }
          HttpClient httpClient = new HttpClient(httpClientHandler, true);
  </code></pre>
  
  <p>This .net Core application work great on Windows 10. But when I'm running it on CentOS 7 (1511 version) I'm getting this error:</p>
  
  <blockquote>
    <p>System.PlatformNotSupportedException: The handler does not support custom handling of certificates with this combination of libcurl (7.29.0) and its SSL backend ("NSS/3.19.1 Basic ECC").
       at System.Net.Http.CurlHandler.SslProvider.SetSslOptionsForUnsupportedBackend(EasyRequest easy, ClientCertificateProvider certProvider)
       at System.Net.Http.CurlHandler.SslProvider.SetSslOptions(EasyRequest easy, ClientCertificateOption clientCertOption)
       at System.Net.Http.CurlHandler.EasyRequest.InitializeCurl()
       at System.Net.Http.CurlHandler.MultiAgent.ActivateNewRequest(EasyRequest easy) 
    --- End of stack trace from previous location where exception was thrown ---</p>
  </blockquote>
  
  <p>Is is a bug in .NetCore? </p>
  
  <p>Should I update some libraries in CentOS? Can I use alternative code that will work in CentOS?</p>