Question

How can I add an own CA Certificat in android? It seems only possible by using the global key manager. But I don't want users to import this key first.

It doesn't have to be installed globaly, only for my application.

I was also looking throu the android SSL Classes but I'm not so familiar with SSL in programming that I'm not sure what Class migth help me.

This solved my question: Android - validating self-signed certificates in addition to normal SSL certificates

Was it helpful?

Solution

I believe that you are looking for what's usally called FakeSocketFactory. This enables usage of SSL cerificates without verifying them (with CA or other certification entity).

You may addapt the class NaiveTrustManager in code bellow to check against your own CA certificate.

You can find a code example in Fake Socket Factory

Regards.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top