Java. NiO channel and TLS

How to protect Java socketchannel, serversocketchannel or even datagram channel using TLS?

I know there are some frameworks (#1 #2) that can be advertised, but I wonder if they can be implemented using pure Java standard libraries

Solution

You need to use SSL engine, as described in non blocking I / O with SSL engine The library you mentioned uses it or the library that uses it

(please note that this is very difficult to use.)

You may find these links interesting:

>This answer (which also contains a link to a book chapter). > Notes from Jean Fran ç OIS Arcand who implemented it in grizzly. > Use asynchronous SSL / TLS to get an example type of problem It should also be relevant to be familiar with the problems mentioned in this question (especially how to deal with asynchronous patterns). > The simple framework also supports asynchronous SSL / TLS

For datagrams, you should study using dtls instead of TLS I'm not sure about its implementation status in Java, but you can browse Java openjdk. security. Archive of devel mailing list

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>