aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes will java ssl socket connection work with out keystore Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "will java ssl socket connection work with out keystore" Watch "will java ssl socket connection work with out keystore" New topic
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: will java ssl socket connection work with out keystore
 
Similar Threads
Opened a socket with ssl. isConnected returns true. But when sending data get 403
regarding https connectivity
java.net.UnknownHostException in SSL
going mad about HttpsURLConnection
SSL enabled client code with client authentication