I would like to know how to use trust manager to accept a self signed certificate in java. I was able to avoid common name check using the following code:
HTTPConduit httpConduit = (HTTPConduit) ClientProxy.getClient(port).getConduit();
TLSClientParameters tlsCP = new TLSClientParameters();
tlsCP.setDisableCNCheck(true);
HttpConduit.setTlsClientParameters(tlsCP);
But I would prefer using trust manager instead.