Hi there,
I'm currently developing an app where (working with a third party) I make calls to their web service.
As part of this, I make a HttpClient (initialised with a new Xamarin.Android.NetAndroidClientHandler() for my Android testing), and after tweaking some request headers, await a response with client.GetStringAsync(targetURL).
With this all in a try catch, it get's caught in a catch with a java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
From what I can gather online, this means that the server is replying with an authentication certificate that isn't trusted. However, I know that the server has been issued with a certificate from a trusted CA, and have found the same type of certificate in the Android device's trusted CA Certificates.
Can someone assist me in getting this working? Some things I've been trying to work out that could help include:
1) Does a Xamarin cross-platform application use the Android devices trusted certificates, or (as it's built with Mono) does it have it's own certificate store somewhere?
2) Am I able to install a trusted certificate as part of the application?
Using the same HttpClient implementation as above, I am able to connect to generic sites like Google and Microsoft. So I don't think it's an issue with implementation, especially as the java exception seems to indicate is is connecting to the web service, just not with a trusted certificate.
Thanks