I have already connected sockets on server and client side and I want to know if it is possible to secure this connection with ssl in java somehow with SSLContext?
I know that client side sockets can be secured like this(with SSL). But i am not sure about connected sockets on server side?
Thanks for your help..
Yes, it is possible on the server side. The SSLSocketFactory class has a createSocket() method just for this purpose. Once you return from the ServerSocket.accept() method you have a normal Socket that you can layer an SSLSocket on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With