Use ffdhe2048 Nginx DH params to fix Weak-DH bug (#4973)

* Rename plugins.common.install_ssl_options_conf to plugins.common.install_version_controlled_file

* Install ssl_dhparams file

* Add installation test

* Add ssl_dhparam option when making a server block ssl

* add install_ssl_dhparams to Installer common plugin class

* Remove redundant code and tests

* update MANIFEST.in
This commit is contained in:
ohemorange
2017-09-01 07:57:30 -07:00
committed by Brad Warren
parent c6bdad4ffb
commit 8ad18cbe6e
9 changed files with 118 additions and 53 deletions
@@ -1989,5 +1989,5 @@ def install_ssl_options_conf(options_ssl, options_ssl_digest):
# XXX if we ever try to enforce a local privilege boundary (eg, running
# certbot for unprivileged users via setuid), this function will need
# to be modified.
return common.install_ssl_options_conf(options_ssl, options_ssl_digest,
return common.install_version_controlled_file(options_ssl, options_ssl_digest,
constants.os_constant("MOD_SSL_CONF_SRC"), constants.ALL_SSL_OPTIONS_HASHES)
@@ -1497,7 +1497,7 @@ class InstallSslOptionsConfTest(util.ApacheTest):
with mock.patch("certbot.plugins.common.logger") as mock_logger:
self._call()
self.assertEqual(mock_logger.warning.call_args[0][0],
"%s has been manually modified; updated ssl configuration options "
"%s has been manually modified; updated file "
"saved to %s. We recommend updating %s for security purposes.")
self.assertEqual(crypto_util.sha256sum(constants.os_constant("MOD_SSL_CONF_SRC")),
self._current_ssl_options_hash())