简体   繁体   中英

Adding custom CA to android

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM