Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

SSL Socket HTTPS - no cipher suites in common

Josh CodeJosh Code Posts: 675Member
I'm trying to get an HTTP server I've developed to work over SSL but I'm running into some problems. I've found some references online about it but I'm hoping to find someone here I can get more help from.

The SSLServerSocket is made without throwing any exceptions. The code for creating the SSLServerSocket and enabling its ciphers is given near the bottom.

When a web browser tries to connect, the server throws java.net.ssl.SSLHandshakeException with message "no cipher suites in common". Following is the stack trace:
[code]
javax.net.ssl.SSLHandshakeException: no cipher suites in common
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.ServerHandshaker.chooseCipherSuite(Unkno
wn Source)
at com.sun.net.ssl.internal.ssl.ServerHandshaker.clientHello(Unknown Sou
rce)
at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(Unknown
Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source
)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Un
known Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Sou
rce)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at fileIO.LEDataInputStream.readLine(LEDataInputStream.java:193)
[/code]

I'm using Java 1.6 and I've enabled all supported ciphers which makes it a little odd that IE, Firefox, and Opera supposedly support none of("no cipher suites in common"). Here is the code I've used to create the SSLServerSocket:
[code]
SSLServerSocketFactory sslserversocketfactory =
(SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
SSLServerSocket sslSS = (SSLServerSocket)sslserversocketfactory.createServerSocket(port);
String[] suites = sslSS.getSupportedCipherSuites();
for (String s: suites)
System.err.println(s);

sslSS.setEnabledCipherSuites(suites);
[/code]

I haven't worked extensively with SSL but have had a working client and server using SSL under its protocol. The difference here is that I didn't make the clients. Firefox, Opera, and IE each are causing problems and I don't know precisely why.

Have you run into a similar problem with SSL before?

Do you have tips or suggestions?




Comments

Sign In or Register to comment.