| Author |
will java ssl socket connection work with out keystore
|
bhaskar ganapathi
Greenhorn
Joined: Aug 11, 2005
Posts: 15
|
|
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() );
|
Bhaskar G
|
 |
D Rog
Ranch Hand
Joined: Feb 07, 2004
Posts: 471
|
|
|
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.
|
Get power of your iPod with MediaChest | Minimal J2EE container is here | Light weight full J2EE stack | My blog | Co-author of "Windows programming in Turbo Pascal"
|
 |
bhaskar ganapathi
Greenhorn
Joined: Aug 11, 2005
Posts: 15
|
|
|
thanks for your reply
|
 |
 |
|
|
subject: will java ssl socket connection work with out keystore
|
|
|