Java SSL Server: No Common Encryption Algorithm with web browser

Hi,

Does anyone out there have some working code that sets up an SSLServerSocket that can communicate with any common browser?

I have tried but get a message from my browser that communication is impossible because their are no common encryption algorithms.

My code for setting up the server socket is:

System.setProperty("javax.net.ssl.keyStore","tester3");

System.setProperty("javax.net.ssl.keyStorePassword","daliso");

serverSocket = (SSLServerSocket) SSLServerSocketFactory.getDefault().createServerSocket(port);

serverSocket.setEnabledCipherSuites(serverSocket.getSupportedCipherSuites());

I generated my key using:

keytool -genkey -alias dee -keyalg RSA -keysize 512 -keystore tester3

Any suggestions would be greatly apprecited.

Thanks,

Daliso

[932 byte] By [Daliso_Zuzea] at [2007-10-1 17:37:50]
# 1

It seems to be working now...

The problem was somewhere in my code I was calling available on the socket and apparently this method does not work for SSLServerSockets :-(

Anyway, if someone out there knows a way to make a server accept both SSL sockets and normal sockets on the same port I'd appreciate the help.

Thanks,

Daliso

Daliso_Zuzea at 2007-7-11 2:34:15 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 2
SSLSocketFactory.createSocket(Socket,host,port,autoclose).You accept normal sockets with ServerSocket.accept(), then if you want SSL you turn them into SSLSockets with the above, setting useClientMode to false.
ejpa at 2007-7-11 2:34:15 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 3

Hi,

Thanks for reply. I'm trying to create a web server that accepts both ssl connections and normal connections on the same port. If the browser tries to connect with a normal socket, I want to be able to detect this and establish a normal socket on the server side. If the browser tries to connect with an ssl socket, the server should be able to detect this and create an ssl socket.

What would be the best way of achieving this?

Many thanks,

Daliso

Daliso_Zuzea at 2007-7-11 2:34:15 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 4
Hi.I just realised that I don't need the above functionality.Thanks,Daliso
Daliso_Zuzea at 2007-7-11 2:34:15 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...