This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

will java ssl socket connection work with out keystore

 
bhaskar ganapathi
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

i am trying to get a connection on a particualr port through

java SSLSocketFactory . below code works fine but my doubt is how it works

with out keystore!!!. how can i check realy encription happens


int port = 443;//
String host = "localhost";

try {
SSLSocketFactory sslFact =
(SSLSocketFactory)SSLSocketFactory.getDefault();
SSLSocket s =
(SSLSocket)sslFact.createSocket(host, port);

s.setNeedClientAuth(true);
s.startHandshake();
System.out.println("the SSL session was created"+s.getSession() );



 
D Rog
Ranch Hand
Posts: 472
Linux Objective C Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not need keystore to establish SSL, since keys are assigned dynamically. However you need it to build a chain of CA, so cacerts used for this purpose. If you get no exceptions you can be sure thatyour connection is secure. You can always verify that by trying to connect to non secure site, or site using not CA signed certificate.
 
bhaskar ganapathi
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your reply
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic