You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Eqbal <eq...@yahoo.com> on 2007/04/27 23:47:17 UTC

SSL error

I am trying to connect to a server using https and I
get this exception thrown:

sun.security.validator.ValidatorException: PKIX path
building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested
target

---------
After this error I did a normal JSSE test mentioned at
the bottom of this page:
http://jakarta.apache.org/commons/httpclient/sslguide.html
It works fine with https://www.verisign.com
I then tried to connect to the certificate authority
in Japan that is issuing the certificate for the
server I am trying to connect to in the first instance
and I get the same/similar error (PKIX path build
failed). How do I fix this?
The japanese certificate authority can be viewed by
accessing https://www2.jcsinc.co.jp
I also tried importing the certificate using following
steps:
1. In Internet Explorer I view the certificate and
save it local disk.
2. I then use keytool -import to import the
certificate.

But I got the same error even after doing this.

It would appear to me that my Java installation
doesn't recognize the certification authority? How do
I make it recognize it? I shouldn't have to import any
specific certificates I would think.

I am using tomcat 5.5.17 with j2se 5.0 and httpclient
3.0.1

Thanks.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: SSL error

Posted by Roland Weber <os...@dubioso.net>.
Hello Eqbal,

> I then tried to connect to the certificate authority
> in Japan that is issuing the certificate for the
> server I am trying to connect to in the first instance
> and I get the same/similar error (PKIX path build
> failed). How do I fix this?
> The japanese certificate authority can be viewed by
> accessing https://www2.jcsinc.co.jp
> I also tried importing the certificate using following
> steps:
> 1. In Internet Explorer I view the certificate and
> save it local disk.
> 2. I then use keytool -import to import the
> certificate.

You may have to import more than one certificate.
There can be a whole path of certificates which have
been used to sign another certificate, from the CA
root certificate down to the one used by the website.
Locate the immediate parent of the certificate used
by the website.
Make sure you update the certificate store that is
used by the client. There may be more than one JDK
on your machine.

hope that helps,
  Roland



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