Java SSL/TLS with Anonymous Diffie Hellman

2019-02-26 01:39发布

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.

标签: java ssl
1条回答
狗以群分
2楼-- · 2019-02-26 02:31

You should set the cipher suite on the SSLSocket (or SSLEngine) using setEnabledCipherSuites.

查看更多
登录 后发表回答