I have a basic client/server application written in Java which uses plain Sockets for communication.
I'd like to prevent passive eavesdropping attacks against it and do the communication over TLS/SSL. I don't want the application user to get in the hassle of setting up certificates etc., I'd like to setup Sockets over SSL with Anonymous Diffie Hellman using AES encryption (TLS_DH_anon_WITH_AES_128_CBC_SHA mode).
However I can't find any suitable examples on net or any documentation as to how I'd setup the SSLContext or SSLSocketFactory to enable the mode I want. I'd appreciate a minimal example for this.
You should set the cipher suite on the
SSLSocket
(orSSLEngine
) usingsetEnabledCipherSuites
.