Resolve Error "unable to find valid certification path to requested target"
How to import certificate ?
Sometimes while working on a client that works with an SSL enabled server running in https protocol, you could get error 'unable to find valid certification path to requested target' if the server certificate is not issued by certification authority, but a self signed or issued by a private CMS. To resolve this error, certificate must be import into trust center so application can use it to consume web service. All you need to do is to add the server certificate to your trusted Java key store if your client is written in Java. You might be wondering how as if you cannot access the machine where the server is installed. There is a simple program can help you.Download Install_cert.java here
This program opens a connection to the specified host and starts SSL handshake.s
Run Install_cert.java file.
C:\>java InstallCert ***.*******.***
Here ***.******.***(after java InstallCert) is domain from where we want to import certificate. Press 1 to import certificate or q to exit. This will generate jssecacerts file. Copy this file and put it in jdk/jre/lib/security folder. Run application, this error will be removed by now.
Note: In the image above, certificate is already imported so key store is not changed.
0 comments:
Post a Comment