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.
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.
What I am doing wrong 开发者_开发知识库?
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.
Thanks in advance.
精彩评论