[Asking] httpclient with ssl
Hi everyone,
I got a problem httpclient that connect to ssl server.
Here my function to excute httpclient
Code :
[COLOR="#0000CD"]public void[/COLOR] run() {
HttpClient hc = new HttpClient();
@SuppressWarnings("deprecation")
Protocol protocol = new Protocol("https", new EasySSLProtocolSocketFactory(), 9082);
hc.getHostConfiguration().setHost("192.168.0.133", 9082, protocol);
String request = "https://192.168.0.133:9082/retail/request?"+paramRequest;
PostMethod httppost = new PostMethod(request);
try {
hc.executeMethod(httppost);
System.out.println(httppost.getStatusLine());
} catch (HttpException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
httppost.releaseConnection();
}
}
But I still don't get where is to put keystore.
Anyone know about this ?
Share me please...