title: The SSL connection could not be established
body: <p>I am using a third party library (<a href="http://dev.splunk.com/csharp" rel="noreferrer">Splunk c# SDK</a> ) in my ASP.NET core application.  I am trying to connect to my localhost Splunk service via this SDK, but I get an exception saying: </p>
  
  <blockquote>
    <p>System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.</p>
  </blockquote>
  
  <p>And The inner exception says:</p>
  
  <blockquote>
    <p>The remote certificate is invalid according to the validation procedure.</p>
  </blockquote>
  
  <p>This SDK uses HTTP client under the hood, but I don't have access to this object to configure HttpClientHandler.  </p>
  
  <p>All my search on google ends up using ServicePointManager to bypass the SSL validation, but this solution doesn't work in Asp.Net core. </p>
  
  <pre><code>ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
  </code></pre>
  
  <p>Is there any way to bypass this validation in asp.Net core?</p>