In my code, I am calling: HttpResponse resp = usingClient.execute(urlGet, hc_context) ; which is responsible to do certificate check. My requirement is I don't want this certificate checking. Can someone please tell me how to bypass this certificate checking.
The api where I am using it is: public static Repository getRepositoryInformation(HttpClient usingClient,
HttpClientContext hc_context, String serverLocation, String loginId, String password, boolean anonymous) throws RAMServiceException{
Repository repository = null;
HttpGet urlGet = createGet(serverLocation+REPOSITORY_INFO);
try {
HttpResponse resp = usingClient.execute(urlGet, hc_context) ;
if(resp.getStatusLine().getStatusCode() != HttpStatus.SC_OK){
throw new RAMServiceException(resp.getStatusLine().getStatusCode(), resp.getStatusLine().getReasonPhrase());
}
Thanks