From 3e2d1c8abc3af99d8e33a50b90c1e0f9282a1d65 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Thu, 9 Jul 2015 08:19:54 +0000 Subject: [PATCH] get_cert_file -> get_cert_path. --- letsencrypt/plugins/common.py | 4 ++-- letsencrypt/plugins/common_test.py | 2 +- letsencrypt_apache/dvsni.py | 2 +- letsencrypt_nginx/dvsni.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/letsencrypt/plugins/common.py b/letsencrypt/plugins/common.py index 1d77636aa..cd148fa5e 100644 --- a/letsencrypt/plugins/common.py +++ b/letsencrypt/plugins/common.py @@ -145,7 +145,7 @@ class Dvsni(object): if idx is not None: self.indices.append(idx) - def get_cert_file(self, achall): + def get_cert_path(self, achall): """Returns standardized name for challenge certificate. :param achall: Annotated DVSNI challenge. @@ -166,7 +166,7 @@ class Dvsni(object): def _setup_challenge_cert(self, achall, s=None): # pylint: disable=invalid-name """Generate and write out challenge certificate.""" - cert_path = self.get_cert_file(achall) + cert_path = self.get_cert_path(achall) # Register the path before you write out the file self.configurator.reverter.register_file_creation(True, cert_path) diff --git a/letsencrypt/plugins/common_test.py b/letsencrypt/plugins/common_test.py index a692efc9c..340cfcf0d 100644 --- a/letsencrypt/plugins/common_test.py +++ b/letsencrypt/plugins/common_test.py @@ -164,7 +164,7 @@ class DvsniTest(unittest.TestCase): self.assertTrue(m_open.called) self.assertEqual( - m_open.call_args[0], (self.sni.get_cert_file(achall), "w")) + m_open.call_args[0], (self.sni.get_cert_path(achall), "w")) self.assertEqual(m_open().write.mock_calls[0][1][0], "pem") self.assertEqual(m_open().write.mock_calls[1][1][0], achall.key.key.private_bytes()) diff --git a/letsencrypt_apache/dvsni.py b/letsencrypt_apache/dvsni.py index e79fc847c..9aaaf85a6 100644 --- a/letsencrypt_apache/dvsni.py +++ b/letsencrypt_apache/dvsni.py @@ -142,6 +142,6 @@ class ApacheDvsni(common.Dvsni): return self.VHOST_TEMPLATE.format( vhost=ips, server_name=achall.nonce_domain, ssl_options_conf_path=self.configurator.parser.loc["ssl_options"], - cert_path=self.get_cert_file(achall), + cert_path=self.get_cert_path(achall), key_path=self.get_key_path(achall), document_root=document_root).replace("\n", os.linesep) diff --git a/letsencrypt_nginx/dvsni.py b/letsencrypt_nginx/dvsni.py index 637f5a7c7..bdf8d4487 100644 --- a/letsencrypt_nginx/dvsni.py +++ b/letsencrypt_nginx/dvsni.py @@ -140,7 +140,7 @@ class NginxDvsni(common.Dvsni): self.configurator.config.work_dir, 'access.log')], ['error_log', os.path.join( self.configurator.config.work_dir, 'error.log')], - ['ssl_certificate', self.get_cert_file(achall)], + ['ssl_certificate', self.get_cert_path(achall)], ['ssl_certificate_key', self.get_key_path(achall)], [['location', '/'], [['root', document_root]]]])