If a user has installed a pfx user certificate on an Android device, chrome browser sees and asks permission to use users client certificate to access a server that accepts such certificates. What is the Xamarin forms equivalent ?
How can we access these certificates in Xamarin form apps for Android.
Under windows (UWP) Accessing user certificates is just
httpClientHandler.ClientCertificateOptions = ClientCertificateOption.Automatic;
httpClientHandler.UseDefaultCredentials = true;
Under Android we are trying to use Custom version AndroidClienthandler
MyAndroidClientHandler clientHandler = new MyAndroidClientHandler();
In a Custom AndroidClientHandler There are 2 problems to solve
1) how to get a certificate from the users certificates from the keychain ?
Something like this post perhaps? Client Certificates on Android
2) How do you add that cert to the ClientHandler?
Can I simply do this
clientHandler.TrustedCerts.Add(cert);
or more likely
Add certificate to SSL Context
Has anyone ever managed to do a HTTPS call using an already installed client certificate from Xamarin forms ?