| Author |
Example of SSLSocket
|
John Landon
Ranch Hand
Joined: Sep 25, 2008
Posts: 221
|
|
Hi,
Where I can find an example of usage of SSLSocket with keystore....
Like here but Socket (because I am on client side).
http://stackoverflow.com/questions/867751/ssl-and-socketchannel
Thanks!
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
The example with SSLContext and SSLServerSocketFactory can be easily adapted to use a SSLSocketFactory instead of a SSLServerSocketFactory. Using that SSLSocketFactory you can then create (SSL) sockets.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
John Landon
Ranch Hand
Joined: Sep 25, 2008
Posts: 221
|
|
I figured.. But the problem is that the code does not even compile.
For example: KeyStore keyStore = new KeyStore();
You cannot do because the constructor is protected. You need to do getInstance and I don't know what "type" to provide....
I am looking for some code that has been ran at least.
|
 |
 |
|
|
subject: Example of SSLSocket
|
|
|