title: Using custom SSL client certificates System.Net.HttpClient on Mono
body: <p>I'm using <a href="https://www.nuget.org/packages/Microsoft.Net.Http">Microsoft HTTP Client Libraries</a> from NuGet and I'm basically trying to allow TLS authentication in HttpClient using X509Certificate2 certificates.</p>
  
  <p>I have tried creating the client like this:</p>
  
  <pre><code>WebRequestHandler certHandler = new WebRequestHandler () {
      ClientCertificateOptions = ClientCertificateOption.Manual,
      UseDefaultCredentials = false
  };
  certHandler.ClientCertificates.Add (this.ClientCertificate);
  HttpClient client = new HttpClient (certHandler);
  </code></pre>
  
  <p>However <code>certHandler.ClientCertificates</code> is failing because this getter is <a href="https://github.com/mono/mono/blob/debdc1c1273402d43bccbe156ca608f7af6262f5/mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest/WebRequestHandler.cs#L84"><strong>not implemented in Mono</strong></a>, so I get a NotImplementedException from that. (I'm not sure why that's still a TODO.)</p>
  
  <p>So far I'm out of luck. Any ideas how can I simply set a client certificate on HttpClient in Mono environment?</p>