Andrid SSL handshake
<p>In my application I have to add the non trusted server certificate to my keystore programmatic. 
I got the X509 certificate and I belive I have to add to the keystore using keyStore.setCertificateEntry() method.</p>

<p>But the the method accepts java.security.cert.Certificate, when I pass the X509 certificate it gives error. But in many places even in android source code they are passing X509 certificate for java.security.cert.Certificate.</p>

<p>What I am doing wrong ?</p>

<p>meanwhile if you have any links for proper handling of server certificate please share it.
All the links I found was to ignore the certificates.</p>

<p>Thanks in advance. </p>
