• Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating an SSL ServerSocket

 
nige whit
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the opposite problem to that listed above.
I want to listen for connections on an SSL socket. I need to have an applet connect back to me on a secure communication link.
I understand that I will need a public and private key, (in a "certificate"?) but the documentation I have found on line has been HUGE and confusing.
I am getting
javax.net.ssl.SSLException: No available certificate corresponds to the SSL cipher suites which are enabled.
at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(DashoA6275)
After I've got this working, I'll obviously need some help getting the applet client to connect!
It's not that I can't be bothered to read stuff, just nothing explains simply what to DO!
 
nige whit
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, thanks everyone!!!
I just wanted non-authenticated secure comms, so I needed anonymous cipher suites.
I found that doing
theSocket.setEnabledCipherSuites(new String[] {
"SSL_DH_anon_WITH_RC4_128_MD5",
"SSL_DH_anon_WITH_DES_CBC_SHA",
"SSL_DH_anon_WITH_3DES_EDE_CBC_SHA",
"SSL_DH_anon_EXPORT_WITH_RC4_40_MD5",
"SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA"});
On both the ServerSocket and the client's Socket fixed this, and I was able to set up a secure TCP/IP connection.
I got those names from displaying the results from theSocket.getEnabledCipherSuites()
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!