Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DHE ciphers not offered #29934

Closed
BenjaminEHowe opened this issue Oct 11, 2019 · 1 comment
Closed

DHE ciphers not offered #29934

BenjaminEHowe opened this issue Oct 11, 2019 · 1 comment

Comments

@BenjaminEHowe
Copy link

  • Version: v10.16.1, v10.16.3, and v12.5.0
  • Platform: Darwin REDACTED 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64 and Linux REDACTED 4.19.66-v7l+ Switch ClosureLinter to other linter. #1253 SMP Thu Aug 15 12:02:08 BST armv7l GNU/Linux
  • Subsystem: https

The https module doesn't appear to be enabling DHE ciphers. When creating a server which should offer ECDHE-RSA-AES128-GCM-SHA256 and DHE-RSA-AES128-GCM-SHA256, only the ECDHE ciphers is actually offered. I've created a sample repository.


Thanks to my colleague, @zamnuts, for his assistance with identifying this issue. He pointed out a smaller example of this issue:

const https = require('https');
const fs = require('fs');

https.createServer({
  key: fs.readFileSync('x509.key'),
  cert: fs.readFileSync('x509.pub')
}, (req, res) => {
  res.writeHead('200');
  res.end('hello world\n');
}).listen(8443);

According to the default cipher suite DHE-RSA-AES128-GCM-SHA256 should be offered, but isn't.

@BenjaminEHowe
Copy link
Author

Unfortunately this was PEBCAK. The DHE ciphers weren't being used because dhparams weren't specified (see: https://nodejs.org/docs/v10.11.0/api/tls.html#tls_tls_createsecurecontext_options). I will try to create a PR to improve the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant