hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Betül AKIN <betul.a...@ibb.gov.tr>
Subject javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateExpiredException:
Date Fri, 09 Feb 2007 12:51:31 GMT

I am connecting to an Https site using Httpclient. It was working fine until today when it
started throwing the exception 


javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateExpiredException: NotAfter:
Fri Jan 09 11:03:00 CET 2007


in line


statusCode = client.executeMethod(authpost);


I was using the following lines


      Protocol myhttps = new Protocol("https", new EasySSLProtocolSocketFactory(), Sabitler.KIK_LOGON_PORT);

      HttpClient client = new HttpClient();

      client.getHostConfiguration().setHost(LOGON_SITE, LOGON_PORT, myhttps);


to connect. I googled the problem and came across  someone who had the same problem(http://www.codeguru.com/forum/archive/index.php/t-322145.html).
The solution suggested was changing the EasySSLProtocolSocketFactory in the following way:


SSLContext context = SSLContext.getInstance("SSL");

new TrustManager[] {(TrustManager)new EasyX509TrustManager(null)}, 
new SecureRandom() );

it also said:

"also its important to keep javax.net.ssl apart from com.sun.net.ssl."


I tried it but it doesn't work for me. Can you suggest anything else? Also what does he mean
by "also its important to keep javax.net.ssl apart from com.sun.net.ssl.".


Thanks in advance;





Bu posta ve ekli dosyaları bilinen tüm viruslere karşı taranmıştır. Viruslere karşı
tedbir olarak tanımadığınız kişi ve kuruluşlardan gelen postaları ve bilmediğiniz
ekli dosyaları açmayınız.

This mail and its attachments have been scanned against all of the known viruses. As a precaution
to viruses and other malicious codes, please do not open the mails and attached files coming
from the people or entities that you are not sure to know.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message