hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Frisaye" <x.fris...@t4hr.com>
Subject https problem
Date Thu, 20 Nov 2003 13:45:03 GMT
Hello,

I'm a noob in https and i need to connect to a https site (https://www.socialsecurity.be/).
But when i instanciate an HttpClient i've got this exception :

javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate
chaining error: issuer DN != subject DN 	
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275) 	
at org.apache.commons.httpclient.HttpConnection$WrappedOutputStream.write(HttpConnection.java:1351)
	
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69) 	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127)
	
at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:779)
	
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2257) 	
at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2629) 

at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1085) 	
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:675) 	
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:530) 	
at test.securitesociale.SecuriteSocialeWebSite.getONSSNumber(SecuriteSocialeWebSite.java:38)

at test.securitesociale.TestSecuriteSociale.main(TestSecuriteSociale.java:8) Caused by: java.security.cert.CertificateException:
Certificate chaining error: issuer DN != subject DN 	
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.a(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA6275) 	
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA6275) 	... 18
more Exception in thread "main" 

And this is my piece of code:

     HttpClient httpclient = new HttpClient();
     GetMethod httpget = new GetMethod( "https://www.socialsecurity.be/" );
     httpclient.executeMethod( httpget );
     System.out.println( httpget.getStatusLine().toString() );

Does anyone already met this problem?

Thank you in advance for your answer



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message