Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Using HttpClient with client certificate?

$
0
0

Summary
I am writing a Xamarin.Forms app that needs to make requests to a REST Api. It needs to use a client certificate to establish 2-way ssl when it talks to the backend.

I would like all of this to be done in a PCL if possible. What is the best way to do this?

What I have so far
Xamarin.Forms can not include the package System.Net.Security (as far as I know). Because of this, I can not use the normal HttpClient from System.Net.Http.HttpClient with client certificates. So I need a different cryptography package, and a different http client that is compatible with the crypto package.

I have found the Bouncy Castle distribution for C#, which seems to be able to handle creating and managing the client certificate. But I have not found an http client that can actually use an Org.BouncyCastle.X509.X509Certificate to set up 2-way SSL.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>