J
josephjelsy
please help me on how to connect to an HTTPS Server using Java
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 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.
If the HTTPS server's key was signed using a valid certificate authorityIs this the way you set up a server or client? I thought you did not
need any sort of cert to be the client.
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.
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.