tls: prevent server from using dhe keys < 768
As part of the fix for logjam, node was upgraded to a level of openssl which rejects connections to servers that are using keys smaller than 768 bits. It is still possible, however, to create a server that uses a smaller key size and and older client may be able to connect to it. This PR moves us to a secure by default stance on the server side as well, preventing the creation of a server using a dhe key size less than 768. This can be overridden with the command line option which is also added. It is derived from https://github.com/nodejs/node/commit/9b35be58100237365c24ab394d3dc6462f9675e6 which was landed in later io.js/node versions but makes the limit 1024. This PR uses the smaller limit in order to meet the recomendations for logjam while matching was was done on the client side in openssl to minimize the potential impacton users. The command line option will only be documented in the release notes and will not be added to the tls documentation. The goal is that people who are upgrading are aware and can use the option if they run into issues, but otherwise the option is not visible/used. PR-URL: https://github.com/nodejs/node/pull/3890 Fixes: https://github.com/nodejs/LTS/issues/49 Reviewed-By:Myles Borins <mborins@us.ibm.com> Reviewed-By:
James Snell <jasnell@gmail.com> Reviewed-By:
Rod Vagg <r@va.gg> Reviewed-By:
Shigeki Ohtsu <ohtsu@iij.ad.jp>
parent
ca97fb6b
Please register or sign in to comment