javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building f
posted 2 years ago
We are required to communicate to the server over SSL, in which we need to get the server certificate and then make a call. Its a private server so getting the certificate over linux is not allowed.
The moment i make a SSL call i can the error as follows: Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target I understand the above exception is because of the CA certificate and the keystore issues.
I am relatively new to socket programming. Can some one explain a step wise approach of how to go about creating a secure connection from client to remote private server only via java class.. I would not be allowed to copy the server certificate and add to keystone using the keyhole utility.
as in how to use Trust Manager..etc..Just a step wise flow would do.