Search code examples
xamarin.formsxamarin.android

How to programatically retrieve installed certificate from device in Android (Xamarin)


I have installed the Trusted Credentials / CA certificate in my android device manually. Is there any way to read this certificate through code using Xamarin Android.

While reading some Android article I am getting a feel that it is possible. But not sure how to implement this. Please help.


Solution

  • It is impossible to achieve this.

    You can't just read a certificate from an installed profile. If you install a new root certificate then you can use that certificate to sign something and then verify (within your app) whether that signature is valid, using the installed root certificated. But you can't read the certificate outright.