Java.nio Channels and TLS
How do I secure a Java SocketChannel , ServerSocketChannel or, perhaps even, a DatagramChannel with TLS? I know that there are some frameworks ( #1 #2 ) that advertise to be able, but I want to know if it is possible to achieve this with the pure Java standard library alone. Bruno You need to use the SSLEngine , as documented in Non-blocking I/O with SSLEngine . The libraries you mention use it or use libraries that use it. (Note that this is notoriously 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