title: Call to TLS 1.2 server with RestSharp works in console app, not in Xamarin Forms
body: <p>I am communicating with a server that uses mutual TLS v1.2. I have been able to make this request in a c# console application, but when I copy this exact code to Xamarin forms, my RestClient gives me an exception: "Connection reset by peer" after a few seconds.</p>
  
  <p>The code:</p>
  
  <pre><code>var client = new RestClient("https://api-sandbox.rabobank.nl/openapi/sandbox/payments/account-information/ais/v3/accounts");
  
          ServicePointManager.Expect100Continue = true;
          ServicePointManager.DefaultConnectionLimit = 9999;
          ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
  
          client.ClientCertificates = new X509CertificateCollection() { certificate };
          client.Proxy = new WebProxy();
  
          var request = new RestRequest(Method.GET);
          var response = client.Execute(request);
          Console.WriteLine(response.StatusCode);
          Console.WriteLine(response.Content);
  </code></pre>
  
  <p>I am unable to share my API keys and such, for obvious reasons. These are added through headers and are removed from the code snippet.</p>
  
  <p>Things I have tried:</p>
  
  <ul>
  <li><p>I checked if the projects are set to use TLS 1.2, both iOS and Android are. </p></li>
  <li><p>I tried this in simulators and on real devices</p></li>
  <li>I tried using <a href="https://github.com/alexrainman/ModernHttpClient" rel="nofollow noreferrer">this</a> library, but whenever I try to add the certificate to the clientcertificate list of the handler, I get a NotImplementedException thrown.</li>
  </ul>