开发者

Securing already connected java sockets with SSL?

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 y开发者_JS百科our 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜