Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / June 2005

Tip: Looking for answers? Try searching our database.

javax.net.ssl.SSLHandshakeException:

Thread view: 
VN - 01 Jun 2005 19:22 GMT
Hi!
I'm using HttpUnit to connect to a secure website.
I need to connect to a website, give a useid, passwd ang login and
download a file from a link from a program. Any help on this is
appreciated.

Heres my piece of code:

WebConversation wc = new WebConversation();
wc.setProxyServer("xxx.xx.xx.xx",8080);

WebRequest request = new GetMethodWebRequest("http://somesecuresite");
    System.out.println("Point 2");
WebResponse response = wc.getResponse(request);
    System.out.println("Point 3");

This is the output when i run the program:
Point 2
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException:
PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderExce
ption: unable to find valid certification path to requested target

Can anyone guide me on this?
Also, would it be possible to programatically install the certificate
on to my JVM so that next time i try a new secure website, i dont have
to install/ copy the certificate? I'm trying to automate the whole
stuff.

Thanks!
Vasu
acalcium@aol.com - 10 Jun 2005 05:36 GMT
> Hi!
> I'm using HttpUnit to connect to a secure website.
[quoted text clipped - 19 lines]
> sun.security.provider.certpath.SunCertPathBuilderExce
> ption: unable to find valid certification path to requested target

Should the URL be https instead of http?

> Can anyone guide me on this?
> Also, would it be possible to programatically install the certificate
> on to my JVM so that next time i try a new secure website, i dont have
> to install/ copy the certificate? I'm trying to automate the whole
> stuff.

U need to define the following javax.net.ssl.keyStore and trustStore.
eg
java -Djavax.net.ssl.keyStore=keystore.ks
-Djavax.net.ssl.keyStorePassword=Password etc...

Similarly for trustStore.

HTH.
Boris Tabenkin - 11 Jun 2005 00:49 GMT
>>Hi!
>>I'm using HttpUnit to connect to a secure website.
[quoted text clipped - 36 lines]
>
> HTH.

I am so confused, would the kesytore be the $(HOME)/kestore? How would
you do this in an applet?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.