SSL no cipher suites in common?

Discussion in 'Java' started by rmacnak@gmail.com, Nov 11, 2006.

  1. Guest

    I'm trying to establish TLS over an existing socket, both the server
    and client are running on the same machine with the same jre, but I
    keep getting a "SSLHandshakeException: no cipher suites in common.", so
    I was wondering how that's even possible.

    Here is the server:

    SSLContext context = SSLContext.getInstance("TLS");

    context.init(null, new javax.net.ssl.TrustManager[]{
    new OpenTrustManager()},
    new java.security.SecureRandom());

    Socket plain = socket;
    // Secure the plain connection
    socket = context.getSocketFactory().createSocket(plain,
    plain.getInetAddress().toString(), plain.getPort(), true);
    socket.setSoTimeout(0);
    socket.setKeepAlive(true);
    ((SSLSocket) socket).setEnableSessionCreation(true);
    ((SSLSocket) socket).setUseClientMode(false);
    ((SSLSocket) socket).setNeedClientAuth(false);

    //enable all available cipher suites
    ((SSLSocket)
    socket).setEnabledCipherSuites(context.getSocketFactory().getSupportedCipherSuites());

    ((SSLSocket) socket).startHandshake(); //SSLHandshakeException: no
    cipher suites in common
     
    , Nov 11, 2006
    #1
    1. Advertising

  2. EJP Guest

    wrote:
    > //enable all available cipher suites
    > ((SSLSocket)
    > socket).setEnabledCipherSuites(context.getSocketFactory().getSupportedCipherSuites());


    Don't do this, it's insecure: it enables insecure cipher suites.

    'No cipher suites in common' means that e.g. you have an RSA certificate
    that the server wants to use as its authentication, but no RSA
    certificates in the client's trusstore, or vice versa.
     
    EJP, Nov 12, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Param R.

    control suites

    Param R., Apr 30, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    1,907
    Peter Blum
    May 1, 2005
  2. Tim

    JUnit and suites

    Tim, Dec 10, 2003, in forum: Java
    Replies:
    1
    Views:
    349
    Adam Jenkins
    Dec 10, 2003
  3. Replies:
    0
    Views:
    413
  4. James Harris

    Books on developing portable C suites

    James Harris, Aug 2, 2003, in forum: C Programming
    Replies:
    13
    Views:
    549
    James Harris
    Aug 6, 2003
  5. Fergus Henderson

    Re Books on developing portable C suites

    Fergus Henderson, Sep 24, 2003, in forum: C Programming
    Replies:
    0
    Views:
    345
    Fergus Henderson
    Sep 24, 2003
Loading...

Share This Page