When I was trying to access a URL through HTTPS, I am getting an exception :
javax.net.ssl.SSLException: Not trusted server certificate Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
I found out in some posts on Stackoverflow that, It should accept some certificates. Please tell me what is the need of accepting the certificate….
Thanking you in advance….
Certificates are authenticated against a root certification authority, like Verisign or Thawte. Some SSL certificates are provided with a chain of intermediate certificates to validate against, which provide the validation up to one of the top level certificates. In a case like this then you need to locally import the intermediate certificates as well as the pages certificate. These need to be imported into the local cacerts file. It is the cacerts file under Java, not sure where that will be on Android, but I have seen it linked on here previously.
Also see Adding SSL Certificate to Keystore. I think you need to do a BouncyCastle download.
This may also be more useful to your particular issue How to create a BKS (BouncyCastle) format Java Keystore that contains a client certificate chain