title: Xamarin HttpClient adding Client Certificate
body: <p>I'm trying to send a request to a web api in Xamarin.Forms. The api requires a client certificate. I attempted to add the client certificate in the core project and in the native project as e.g. described here <a href="https://stackoverflow.com/questions/48951913/xamarin-android-adding-client-certificate">xamarin.android adding client certificate</a>. However, I always get the response &quot;400 No required SSL certificate was sent&quot;. If I send the request via e.g. Postman or openSSL, everything works fine. I've tested the request on Android and on iOS, but I always get the 400. Can anyone help?</p>
  <p>Note: For Android, I am using the HttpClient implementation 'Android' and the TLS implementation 'Native TLS 1.2+'</p>
  <p>The code I am using in the core project:</p>
  <pre><code>            var handler = new HttpClientHandler
              {
                  ClientCertificateOptions = ClientCertificateOption.Manual,
                  SslProtocols = System.Security.Authentication.SslProtocols.Tls12,
                  ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) =&gt; true
              };
  
              //clientCertificateFileName is the location where the certificate is saved
              var clientCertificate = new X509Certificate2(clientCertificateFileName, &quot;password&quot;);
              handler.ClientCertificates.Add(clientCertificate);
  
              client = new HttpClient(handler);
  
              var response = await client.GetAsync(targetUrl);
  </code></pre>