This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What value is to be set in javax.net.ssl.trustStore?

 
Yogesh Gandhi
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one file that is provided to me by the customer (i.e. server.cer)

I used a command something like below to create a keystore.ks file

keytool -import -alias bob -file bob.crt -keystore keystore.ks

I add this to

System.setProperty("javax.net.ssl.trustStore", "keystore.ks");

Can someone please confirm if I am doing it right?

And why not should I do

System.setProperty("javax.net.ssl.trustStore", "server.cer");


Please do let me know your views.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic