1

I am using the latest jetty and jdk, it should be supporting DSA cipher suites like TLS_DHE_DSS.... So I generated a certificate file and key pairs with DSA algorithm, uploaded it to my server, and restarted my server, the server started successfully. But after that, I could not use any browser to open any page of that server. All I saw is an error message on the page: ERR_SSL_VERSION_OR_CIPHER_MISMATCH.

Could anyone help me with this? Is there any issue with jetty for DSA?

enbo tang
  • 11
  • 1

2 Answers2

1

There's no point spamming both stackoverflow AND the github issues (we pay attention to both)

To the point of DSA in your keytool/keystore, you cannot use that for SSL/TLS (not supported by Jetty, Java, and even the various SSL/TLS protocol versions themselves. DSA is just a signing/verification algorithm, it doesn't to encryption/decryption/key exchange needed for SSL/TLS).

Use RSA for the keystore and specify a SHA256 algorithm (or higher) and a bit size of 4096 (or better).

Dump your startup and look at why the ciphers you are interested in are disabled.

$ cd /path/to/my/jettybase
$ java -jar /path/to/jetty-dist/start.jar jetty.server.dumpAfterStart=true

Look for the SslContextFactory tree, and the Cipher Suites branch. The Disabled section will list every disabled Cipher suite, and also indicate where that particular cipher suite was disabled.

You'll see...

  • JreDisabled which means that the JVM itself has it disabled.
  • ConfigExcluded which means that your ${jetty.base} configuration has it disabled.

Either way you'll want to look at the Enabling / Disabling Specific Cipher Suites in the documentation to understand how to set it up to suite your particular needs.

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
0

I'm having a similar problem with the embedded Jetty in OpenNMS.Wireshark capture showing Ciphers offered by the browser

As far as I can tell there are multiple common ciphers and TLS versions between what is offered by the browser and what is supported by Jetty, and yet Jetty is rejecting the connection with the above mismatched cipher error message. All three main browsers seem to fail similarly with a Fatal Hanshake (TLS1.2) failure. However using a non-FQDN hostname to create a host/domain name mismatch allows the user to set up a site exception and TLS to "succeed" with TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA and TLS v1.2 . It would therefore appear that the ciphers aren't the problem. Something else in the handshake is causing the Jetty failure and the browsers are misinterpreting the response as a cipher mismatch.

From the Jetty post-start dump:

 |   |   += SslContextFactory@629464ad(file:///opt/opennms/etc/jetty.keystore,file:///opt/opennms/etc/jetty.keystore) trustAll=false
 |   |   |   +- Protocol Selections
 |   |   |   |   +- Enabled (size=3)
 |   |   |   |   |   +- TLSv1
 |   |   |   |   |   +- TLSv1.1
 |   |   |   |   |   +- TLSv1.2
 |   |   |   |   +- Disabled (size=2)
 |   |   |   |       +- SSLv2Hello - ConfigExcluded:'SSLv2Hello'
 |   |   |   |       +- SSLv3 - JreDisabled:java.security, ConfigExcluded:'SSLv3'
 |   |   |   +- Cipher Suite Selections
 |   |   |       +- Enabled (size=42)
 |   |   |       |   +- TLS_DHE_DSS_WITH_AES_128_CBC_SHA
 |   |   |       |   +- TLS_DHE_DSS_WITH_AES_128_CBC_SHA256
 |   |   |       |   +- TLS_DHE_DSS_WITH_AES_128_GCM_SHA256
 |   |   |       |   +- TLS_DHE_DSS_WITH_AES_256_CBC_SHA
 |   |   |       |   +- TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
 |   |   |       |   +- TLS_DHE_DSS_WITH_AES_256_GCM_SHA384
 |   |   |       |   +- TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
 |   |   |       |   +- TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
 |   |   |       |   +- TLS_DHE_RSA_WITH_AES_256_CBC_SHA
 |   |   |       |   +- TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
 |   |   |       |   +- TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
 |   |   |       |   +- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
 |   |   |       |   +- TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
 |   |   |       |   +- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
 |   |   |       |   +- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
 |   |   |       |   +- TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
 |   |   |       |   +- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
 |   |   |       |   +- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
 |   |   |       |   +- TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
 |   |   |       |   +- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
 |   |   |       |   +- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
 |   |   |       |   +- TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
 |   |   |       |   +- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
 |   |   |       |   +- TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
 |   |   |       |   +- TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
 |   |   |       |   +- TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
 |   |   |       |   +- TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
 |   |   |       |   +- TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
 |   |   |       |   +- TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
 |   |   |       |   +- TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
 |   |   |       |   +- TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
 |   |   |       |   +- TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
 |   |   |       |   +- TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
 |   |   |       |   +- TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
 |   |   |       |   +- TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
 |   |   |       |   +- TLS_EMPTY_RENEGOTIATION_INFO_SCSV
 |   |   |       |   +- TLS_RSA_WITH_AES_128_CBC_SHA
 |   |   |       |   +- TLS_RSA_WITH_AES_128_CBC_SHA256
 |   |   |       |   +- TLS_RSA_WITH_AES_128_GCM_SHA256
 |   |   |       |   +- TLS_RSA_WITH_AES_256_CBC_SHA
 |   |   |       |   +- TLS_RSA_WITH_AES_256_CBC_SHA256
ppanon
  • 1