문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top