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 / General / April 2006

Tip: Looking for answers? Try searching our database.

Connect to an HTTPS Server

Thread view: 
josephjelsy@gmail.com - 10 Apr 2006 06:44 GMT
please help me on how to connect to an HTTPS Server using Java
Tomek - 10 Apr 2006 10:46 GMT
Hi
Create the client as usual ( just like a regular http connection ) and
run this clien with parameters :
java -Djavax.net.ssl.trustStore=myCertStore.jks
-Djavax.net.ssl.trustStorePassword=myKeyStorePassword  -jar
MyClient.jar
Assuming you have the server key in you keystore.
Roedy Green - 10 Apr 2006 18:02 GMT
>Create the client as usual ( just like a regular http connection ) and
>run this clien with parameters :
>java -Djavax.net.ssl.trustStore=myCertStore.jks
>-Djavax.net.ssl.trustStorePassword=myKeyStorePassword  -jar
>MyClient.jar
>Assuming you have the server key in you keystore.

Is this the way you set up a server or client?  I thought you did not
need any sort of cert to be the client.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Juha Laiho - 10 Apr 2006 19:43 GMT
Roedy Green <my_email_is_posted_on_my_website@munged.invalid> said:

>>Create the client as usual ( just like a regular http connection ) and
>>run this clien with parameters :
[quoted text clipped - 5 lines]
>Is this the way you set up a server or client?  I thought you did not
>need any sort of cert to be the client.

The client needs to have CA certificates to verify the authenticity of
the server certificate - thus the trustStore. Similarly regular browsers
have quite a pile of preinstalled CA certificates; otherwise there would
be no protection against site spoofing; there would only be protection
against traffic eavesdropping.
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)

Roedy Green - 10 Apr 2006 23:20 GMT
On Mon, 10 Apr 2006 18:43:27 +0000 (UTC), Juha Laiho
<Juha.Laiho@iki.fi> wrote, quoted or indirectly quoted someone who
said :

>The client needs to have CA certificates to verify the authenticity of
>the server certificate - thus the trustStore. Similarly regular browsers
>have quite a pile of preinstalled CA certificates; otherwise there would
>be no protection against site spoofing; there would only be protection
>against traffic eavesdropping.

slightly off topic, but I downloaded Opera 8.54 and it seems finally
to have its SSL act together, and least enough to work with my credit
union finally.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Missaka Wijekoon - 11 Apr 2006 07:47 GMT
snip
>>Create the client as usual ( just like a regular http connection ) and
>>run this clien with parameters :
[quoted text clipped - 5 lines]
> Is this the way you set up a server or client?  I thought you did not
> need any sort of cert to be the client.
If the HTTPS server's key was signed using a valid certificate authority
(i.e from Verisign, Thawte or whatever comes with Java) then the client
does not need anything.
Juha Laiho - 12 Apr 2006 20:55 GMT
Missaka Wijekoon <nntp@wijekoon.com> said:
>snip
>>>Create the client as usual ( just like a regular http connection ) and
[quoted text clipped - 9 lines]
>(i.e from Verisign, Thawte or whatever comes with Java) then the client
>does not need anything.

... no; the client still needs the corresponding CA certificates.
However, a number of these are provided with the Java environment;
f.ex. the cacerts file provided with 1.5.0_06 distribution appears to
contain 33 CA certificate entries. If you remove those, not even
Verisign or Thawte certificates work.
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)



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.