Hi,

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");

context.init(
null, 
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;

 

Betul



 

 

**********************************************************************
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.

Reply via email to