I hav a ques whether SSLSocket is only for Web application and wether certificate is mandatory for it..if so can anyone plz explain me that with a simple example......
Printable View
I hav a ques whether SSLSocket is only for Web application and wether certificate is mandatory for it..if so can anyone plz explain me that with a simple example......
SSL is not only for web applications, I used it for p2p chat. You can create SSLServerSocket and SSLSocket just like you would do normal Sockets. But in order to do so you need to setup a SSLContext(read about this) and for that you need to have a certificate or a keypair, preferably in a keystore.
tanx..cst..but can u please reply me with a simple code..i had just tried ..but got only run time error..
i had creaated a keystore...but i is nt working fr me..
search this forum for ssl and you will find what you need
thanks cst...i had solved that problem and i connected client with server using SSL normally in command prompt.....
but i hav to work for my project on Eclipse .. but i dont know how to run the same in Eclipse..Please tell me that...
In Eclipse you have the run button, it is green and looks like "play", the console in eclipse is on the bottom by default
i had tried ..but it is not working and i am getting the exception as no certificate available..
It is working because you are getting an exception, which means you are doing something wrong, you should know which part of your code throws an exception, and what to do to fix it, do you have the keystore in proper path?