Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] SSLHandshakeException: no cipher suites in common for all connections

Hi

Using this code:

import org.eclipse.jetty.server.*;
import org.eclipse.jetty.util.ssl.*;
import org.eclipse.jetty.util.log.*;

public class JettySSLFailure {

   public static void main(String[] args) throws Exception {
      Log.getRootLogger().setDebugEnabled(true);
      Server server = new Server();
      SslContextFactory sslContextFactory = new SslContextFactory();
      sslContextFactory.setKeyStorePath("trajan.jks");
      sslContextFactory.setKeyStoreType("JCEKS");
      sslContextFactory.setKeyStorePassword("welcome1");
      sslContextFactory.setCertAlias("trajanssl");
      sslContextFactory.setKeyManagerPassword("welcome1");
      SslConnectionFactory sslConnectionFactory =
              new SslConnectionFactory(
              sslContextFactory, "http/1.1");
      HttpConfiguration sslHttpConfig = new HttpConfiguration();
      HttpConnectionFactory httpConnectionFactory =
              new HttpConnectionFactory(sslHttpConfig);
      ServerConnector serverConnector =
              new ServerConnector(server, sslConnectionFactory,
              httpConnectionFactory);
      serverConnector.setPort(9999);
      server.addConnector(serverConnector);
      server.start();
   }
}

And this keystore https://sites.google.com/site/skissane/files/trajan.jks

And these JARs: javax.servlet-3.0.0.v201112011016.jar
jetty-http-9.0.4.v20130625.jar jetty-io-9.0.4.v20130625.jar
jetty-server-9.0.4.v20130625.jar jetty-util-9.0.4.v20130625.jar

Any SSL connection attempt results in logging as debug:
javax.net.ssl.SSLHandshakeException: no cipher suites in common

java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
Win 7 SP1 x64

Anyone have any idea what I am doing wrong? Also, I think there is a
bug here - the SSLEngine generates an SSL error response, which I can
see from the  -Djavax.net.debug=all output, but Jetty never passes
that back to the client.

Thanks
Simon Kissane


Back to the top