hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amit parnerkar <amit_parner...@yahoo.com>
Subject javax.net.ssl.SSLHandshakeException: certificate expired (can we ignore it??)
Date Mon, 20 Dec 2004 22:00:18 GMT
Hi,
We are using the following httpclient code to connect to website using https protocol. The
problem is that the server certificate is expired on www.myhome.net and the following code
is throwing SSL Handshake exception because of CertificateExpired exception.
Is there a way we can still use this expired certificate and still send data encrypted?? 
One more thing, this code works fine from my local machine (windows with WSAD) but not from
development or production (both unix box).
Application is deployed in Websphere app server 5.0
Any help is highly appreciated.
 
   userName = "userName";
   passWord = "XXXX";
   connectURL = "https://www.myhome.net/processrequest.cgi";
  HttpClient httpclient = new HttpClient();
  HttpState aState = httpclient.getState();
  Credentials credentials =
   new UsernamePasswordCredentials(userName, passWord);
  aState.setCredentials(new AuthScope(null, -1), credentials);
  PostMethod httpPost = new PostMethod(connectURL);
  NameValuePair[] data = { new NameValuePair("requestxml", requestXML)};
  httpPost.setRequestBody(data);
  BufferedReader in = null;
  try {
   httpclient.executeMethod(httpPost);
   in =
    new BufferedReader(
     new InputStreamReader(httpPost.getResponseBodyAsStream()));
}catch(...)

		
---------------------------------
Do you Yahoo!?
 Send a seasonal email greeting and help others. Do good.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message