CloseableHttpClient client = HttpClients.custom().setSSLHostnameVerifier(new NoopHostnameVerifier()).build();
is giving me an error of :
[sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]
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.e. it is not adding all self-signed certificates as expected..
My HTTPClient version is 4.5.1 and HTTPCore is version 4.4.4
Please give me a solution without using deprecated methods like SSLContextBuilder