mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 13:59:02 -04:00
nginx plugin requires fullchain_path
This commit is contained in:
parent
74237d1010
commit
e8fc2eca01
2 changed files with 13 additions and 0 deletions
|
|
@ -140,6 +140,10 @@ class NginxConfigurator(common.Plugin):
|
|||
a lack of directives or configuration
|
||||
|
||||
"""
|
||||
if not fullchain_path:
|
||||
raise errors.PluginError(
|
||||
"--fullchain-path is required for nginx plugin.")
|
||||
|
||||
vhost = self.choose_vhost(domain)
|
||||
cert_directives = [['ssl_certificate', fullchain_path],
|
||||
['ssl_certificate_key', key_path]]
|
||||
|
|
|
|||
|
|
@ -134,6 +134,15 @@ class NginxConfiguratorTest(util.NginxTest):
|
|||
None,
|
||||
"example/fullchain.pem")
|
||||
|
||||
def test_deploy_cert_requires_fullchain_path(self):
|
||||
self.config.version = (1, 3, 1)
|
||||
self.assertRaises(errors.PluginError, self.config.deploy_cert,
|
||||
"www.example.com",
|
||||
"example/cert.pem",
|
||||
"example/key.pem",
|
||||
"example/chain.pem",
|
||||
None)
|
||||
|
||||
def test_deploy_cert(self):
|
||||
server_conf = self.config.parser.abs_path('server.conf')
|
||||
nginx_conf = self.config.parser.abs_path('nginx.conf')
|
||||
|
|
|
|||
Loading…
Reference in a new issue