Connect to an HTTPS Server

T

Tomek

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.
 
R

Roedy Green

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.
 
J

Juha Laiho

Roedy Green said:
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.
 
R

Roedy Green

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.
 
M

Missaka Wijekoon

Roedy Green wrote:
snip
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.
 
J

Juha Laiho

Missaka Wijekoon said:
Roedy Green wrote:
snip
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.

.... 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top