Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > ssl handshake error

Reply
Thread Tools

ssl handshake error

 
 
G. Garrett Campbell
Guest
Posts: n/a
 
      02-28-2008
I am attempting to connect to an ssl server and I get the following error:

Both IE and Firefox connect to this site correctly.

Using very similar code (HttpClient) I am able to connect to other https
sites.

Any idea whats wrong?

[I also tried java1.6 with similar results]

Thanks

C:\trackm\air>"c:\program files\java\jdk1.5.0_07\bin\java" AirBerlin
http://www.velocityreviews.com/forums/(E-Mail Removed) track123 Campbell debug
want
https://www.airberlin.com/site/topbo...s.php?LANG=eng
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderE xception: unable to find
valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLExceptio n(Alerts.java:150)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(S SLSocketImpl.java:151
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Ha ndshaker.java:174)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Ha ndshaker.java:16
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serv erCertificate(ClientHandshaker.java:84
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.proc essMessage(ClientHandshaker.java:106)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoo p(Handshaker.java:495)
at
com.sun.net.ssl.internal.ssl.Handshaker.process_re cord(Handshaker.java:433)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRec ord(SSLSocketImpl.java:81
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.perform InitialHandshake(SSLSocketImpl.java:1030)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRe cord(SSLSocketImpl.java:622)
at
com.sun.net.ssl.internal.ssl.AppOutputStream.write (AppOutputStream.java:59)
at java.io.BufferedOutputStream.flushBuffer(BufferedO utputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputS tream.java:123)
at
org.apache.commons.httpclient.HttpConnection.flush RequestOutputStream(HttpConnection.java:82
at
org.apache.commons.httpclient.HttpMethodBase.write Request(HttpMethodBase.java:2124)
at
org.apache.commons.httpclient.HttpMethodBase.execu te(HttpMethodBase.java:108
at
org.apache.commons.httpclient.HttpMethodDirector.e xecuteWithRetry(HttpMethodDirector.java:39
at
org.apache.commons.httpclient.HttpMethodDirector.e xecuteMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMe thod(HttpClient.java:397)
at
org.apache.commons.httpclient.HttpClient.executeMe thod(HttpClient.java:323)
at HttpAccount.formGet(HttpAccount.java:495)
at HttpAccount.formGet(HttpAccount.java:480)
at HttpAccount.doit(HttpAccount.java:83)
at HttpAccount.doit(HttpAccount.java:64)
at AirBerlin.doit(AirBerlin.java:120)
at HttpAccount.process(HttpAccount.java:44)
at AirBerlin.main(AirBerlin.java:1
Caused by: sun.security.validator.ValidatorException: PKIX path building
failed: sun.security.provider.certpath.SunCertPathBuilderE xception: unable
to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXV alidator.java:221)
at
sun.security.validator.PKIXValidator.engineValidat e(PKIXValidator.java:145)
at sun.security.validator.Validator.validate(Validato r.java:203)
at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl. checkServerTrusted(X509TrustManagerImpl.java:172)
at
com.sun.net.ssl.internal.ssl.JsseX509TrustManager. checkServerTrusted(SSLContextImpl.java:320)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serv erCertificate(ClientHandshaker.java:841)
... 23 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderE xception:
unable to find valid certification path to requested target
at
sun.security.provider.certpath.SunCertPathBuilder. engineBuild(SunCertPathBuilder.java:236)
at java.security.cert.CertPathBuilder.build(CertPathB uilder.java:194)
at sun.security.validator.PKIXValidator.doBuild(PKIXV alidator.java:216)
... 28 more


 
Reply With Quote
 
 
 
 
EJP
Guest
Posts: n/a
 
      02-29-2008
G. Garrett Campbell wrote:
> javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderE xception: unable to find
> valid certification path to requested target


This means your truststore doesn't trust the server certificate it
received. Either get them to use a CA-signed certificate, or (worse) get
them to export it and import it into your truststore.
 
Reply With Quote
 
 
 
 
G. Garrett Campbell
Guest
Posts: n/a
 
      02-29-2008
Why do Firefox and IE accept it, when java does not?
Is java out of date?
Thanks

"EJP" <(E-Mail Removed)> wrote in message
news:d6Oxj.20595$(E-Mail Removed)...
> G. Garrett Campbell wrote:
>> javax.net.ssl.SSLHandshakeException:
>> sun.security.validator.ValidatorException: PKIX path building failed:
>> sun.security.provider.certpath.SunCertPathBuilderE xception: unable to
>> find valid certification path to requested target

>
> This means your truststore doesn't trust the server certificate it
> received. Either get them to use a CA-signed certificate, or (worse) get
> them to export it and import it into your truststore.



 
Reply With Quote
 
EJP
Guest
Posts: n/a
 
      03-03-2008
G. Garrett Campbell wrote:
> Why do Firefox and IE accept it, when java does not?


Because they use different truststores?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
debugging ssl handshake failure Ovidiu Deac Python 0 03-19-2012 11:41 AM
Non-blocking SSL handshake Tony Arcieri Ruby 3 02-08-2008 01:35 AM
Python server j2me client ssl socket handshake error eliseo@dplanet.ch Python 0 11-16-2007 10:31 AM
Verifying an assumption around possible problem areas in SSL handshake ljnelson@gmail.com Java 3 06-21-2006 05:40 AM
question on handshake with ssl connection Jakekeke Java 0 10-19-2004 08:25 AM



Advertisments