get_cert_file -> get_cert_path.

This commit is contained in:
Jakub Warmuz 2015-07-09 08:19:54 +00:00
parent 1bc9e7cb64
commit 3e2d1c8abc
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA
4 changed files with 5 additions and 5 deletions

View file

@ -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)

View file

@ -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())

View file

@ -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)

View file

@ -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]]]])