How to trust self signed certificate on Android?
<p>I have generated self signed certificate for my server.
Then added it to Android with Settings -> Security -> Install.</p>

<p>When I'm trying to connect to my server from the application I'm getting error:</p>

<pre><code>java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
</code></pre>

<p>As I understand after I've added certificate to list of trusted ones it should work fine. Am I missing something?
The idea is to add certificate through Android system without modifying application code.</p>

<p>Btw I'm using <code>OkHttpClient</code> for network connection. Maybe I should enable something for <code>https</code> connection?</p>