Can anyone verify this fix secures against the Logjam vulnerability for Apache Tomcat?

I'm sceptical about it's effectiveness, since it doesn't mention how to implement the user defined 2048 bit DH parameter file in Tomcat, but its cipher list does use "DHE" ciphers. Yesterday there was a mention about a "SSLDHParametersFile" setting, but it was removed, possibly due to this bug, where it says Tomcat can only handle 1024 bit DH key lengths. But I'm not an expert on this, possibly mixing things up here.

At the moment, the WeakDH site says you should add this cipher list to the Connector in the server.xml file (for JSSE) to fix it:


  • I'm voting to close this question as off-topic because it's better suited for Tomcat's IRC or mailing lists
    – RoraΖ
    Commented May 21, 2015 at 13:25
  • 3
    @raz This is inherently an information security question. The fact that it's a question about server configuration is irrelevant. This group is inherently cross-functional, and covers many disciplines. Please don't turn Information Security into a finger pointing exercise where we refer them to another forum, and they do the same thing. Commented May 21, 2015 at 15:45
  • 1
    The OP is asking if a specific configuration for Tomcat will fix a security vulnerability. Pointing the OP to the people who are experts in the software is not finger pointing. They are in a better position of knowing whether or not that fix specific to Tomcat will work, or possibly provide a better solution than InfoSec SE. Feel free to join The DMZ if you would like to discuss it further.
    – RoraΖ
    Commented May 21, 2015 at 16:35
  • @raz in this specific case, given the discussions we've had on the chat I'm inclined to thinking that Tomcat experts might provide a wrong answer, as multiple factors are involved in correcting Logjam. Commented May 21, 2015 at 16:40
  • 1
    Tomcat by default uses Java SSL (JSSE). The cipherlist originally on weakdh, which you quoted, is in OpenSSL format and won't work at all; the website is now fixed. The bug report you link to is about TCNative /APR (and OpenSSL) and irrelevant to JSSE. Your comment on @Rhino answer says you disabled all DHE (keeping only ECDHE) but your edit here implies ssllabs is still seeing DHE suites with 768-bit; which is correct? If you do want to use (nonEXPORT) DHE in JSSE, you need to run on Java8 to get 1024-bit DHE (and that's a fixed/shared group). Commented May 27, 2015 at 13:44

3 Answers 3


So I think I've interpreted your question correctly. If not, fire away in the comments.

Confusingly there are several factors in diffie hellman: are you doing it over elliptic curves or not, what size group have you got (let's assume "strong" and "not strong") and whether you generate ephemeral private/public keypairs or not.

The problem with logjam is this: if you have a plain old group variant of DHE, then if you can persuade the server to downgrade to the export (weak variety) level strength, then with some precomputations made before you can break the secret generated for a session in minutes.

This is conditional on being able to downgrade size variable to a smaller one - if you can do this over the plain old DHE variant, then you're in business.

This requires the cipher suite have DHE_..._EXPORT_... in it, such as TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA. Now that has a bunch of other problems like 40-bit DES and whatnot, but essentially, there could feasibly be some servers out there that support EXPORT variants of DHE with better symmetric ciphers. Or they could actually be negotiating 40-bit DES if persuaded.

The point is to perform a downgrade attack. The cipher suite list you've given doesn't allow for export ciphers.

You could turn off all non-EC variants of DH. However, this might limit client side support. Whether or not you can be so limiting is really up to you. But "DHE" in and of itself is fine, unless there's export in there somewhere. Make sure export ciphers are disabled, and follow Thomas' advice in the answer you linked.

Now on to SSLDHParametersFile - in DHE, the prime and generator of the group can actually be fixed ahead of time - the bit that is ephemeral is the private key chosen in that group. This way, by setting the parameters you can control what size group your server uses.

For example, the output of this might be:

openssl dhparam 2048 -text
    PKCS#3 DH Parameters: (2048 bit)
    generator: 2 (0x2)

Tellingly, from your example bug, it sounds like it is not possible to use these parameter files quite yet with Tomcat. I'm not an expert on Tomcat, so, I can't really say but if you have instructed the cipher suites to not allow export, OpenSSL should default to a 1024-bit DH group, which is good enough for now.

You can, then, when the patch is available, upgrade your DH parameters as you see fit.

  • Well, I turned off all non ECDHE-RSA-AES* cipher suites. According to Qualys this "only" breaks: very old android, WinXP, openssl older than 1.0.0 and java 6. If you allow TLS 1.0 and 1.2.
    – SEJPM
    Commented May 22, 2015 at 11:46
  • @SOJPM if you don't need these platforms I see nothing wrong with doing that personally. I think IE has trouble with EC up to a certain point, but I can't remember. Best to test. In any case, disabling older ciphersuites that you don't need is the best outcome. If you can only use TLS 1.2 that's best, but obviously for most service providers this isn't practical.
    – user70990
    Commented May 26, 2015 at 12:37

As an addition to the awnser I list my practise:

For the moment I would not allow direct communications with tomcat, but setup a Reverse Proxy Connection using nginx.

And have nginx do all the SSL bits. The main advantages are that nginx can be setup with better DH keys and Cipher support. as a bonus if someone is trying to 'hack' my tomcat through overflow injection. it will propably only get to the nginx proxy and not to the tomcat itself. (so another layer to defeat for an attacker)


Disable any CBC mode ciphers and SSL protocols, only enable TLS 1.1 & 1.2 protocols in your server.xml.

Mozilla has a good guide for allowed ciphers as well. https://wiki.mozilla.org/Security/Server_Side_TLS

  • AEAD-only is not viable. Many clients (e.g. all Apple devices) don't support AEAD.
    – Z.T.
    Commented Jun 6, 2015 at 14:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .