From 278bd8deb2d33328b7606644da662259132dfde2 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Tue, 23 Jun 2015 07:34:17 +0000 Subject: [PATCH] Rename IConfig.csr_dir back to IConfig.cert_dir. This will be used in #504. --- letsencrypt/client.py | 2 +- letsencrypt/configuration.py | 6 +++--- letsencrypt/constants.py | 4 ++-- letsencrypt/interfaces.py | 4 +++- letsencrypt/tests/configuration_test.py | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/letsencrypt/client.py b/letsencrypt/client.py index e1e30b9be..30bf41975 100644 --- a/letsencrypt/client.py +++ b/letsencrypt/client.py @@ -157,7 +157,7 @@ class Client(object): cert_key = crypto_util.init_save_key( self.config.rsa_key_size, self.config.key_dir) csr = crypto_util.init_save_csr( - cert_key, domains, self.config.csr_dir) + cert_key, domains, self.config.cert_dir) # Retrieve certificate certr = self.network.request_issuance( diff --git a/letsencrypt/configuration.py b/letsencrypt/configuration.py index 670db0e76..d6b29bd73 100644 --- a/letsencrypt/configuration.py +++ b/letsencrypt/configuration.py @@ -19,7 +19,7 @@ class NamespaceConfig(object): - `accounts_dir` - `account_keys_dir` - - `csr_dir` + - `cert_dir` - `cert_key_backup` - `in_progress_dir` - `key_dir` @@ -65,8 +65,8 @@ class NamespaceConfig(object): constants.CERT_KEY_BACKUP_DIR, self.server_path) @property - def csr_dir(self): # pylint: disable=missing-docstring - return os.path.join(self.namespace.config_dir, constants.CSR_DIR) + def cert_dir(self): # pylint: disable=missing-docstring + return os.path.join(self.namespace.config_dir, constants.CERT_DIR) @property def in_progress_dir(self): # pylint: disable=missing-docstring diff --git a/letsencrypt/constants.py b/letsencrypt/constants.py index 152bc224e..5433299fc 100644 --- a/letsencrypt/constants.py +++ b/letsencrypt/constants.py @@ -67,8 +67,8 @@ CERT_KEY_BACKUP_DIR = "keys-certs" """Directory where all certificates and keys are stored (relative to `IConfig.work_dir`). Used for easy revocation.""" -CSR_DIR = "csrs" -"""Directory (relative to `IConfig.config_dir`) where CSRs are saved.""" +CERT_DIR = "certs" +"""See `.IConfig.cert_dir`.""" IN_PROGRESS_DIR = "IN_PROGRESS" """Directory used before a permanent checkpoint is finalized (relative to diff --git a/letsencrypt/interfaces.py b/letsencrypt/interfaces.py index 78ad75f65..d10e29bcd 100644 --- a/letsencrypt/interfaces.py +++ b/letsencrypt/interfaces.py @@ -161,7 +161,9 @@ class IConfig(zope.interface.Interface): account_keys_dir = zope.interface.Attribute( "Directory where all account keys are stored.") backup_dir = zope.interface.Attribute("Configuration backups directory.") - csr_dir = zope.interface.Attribute("CSRs storage.") + cert_dir = zope.interface.Attribute( + "Directory where newly generated Certificate Signing Requests " + "(CSRs) and certificates not enrolled in the renewer are saved.") cert_key_backup = zope.interface.Attribute( "Directory where all certificates and keys are stored. " "Used for easy revocation.") diff --git a/letsencrypt/tests/configuration_test.py b/letsencrypt/tests/configuration_test.py index 38fea140a..d5e9296dd 100644 --- a/letsencrypt/tests/configuration_test.py +++ b/letsencrypt/tests/configuration_test.py @@ -34,7 +34,7 @@ class NamespaceConfigTest(unittest.TestCase): constants.ACCOUNT_KEYS_DIR = 'keys' constants.BACKUP_DIR = 'backups' constants.CERT_KEY_BACKUP_DIR = 'c/' - constants.CSR_DIR = 'csrs' + constants.CERT_DIR = 'certs' constants.IN_PROGRESS_DIR = '../p' constants.KEY_DIR = 'keys' constants.REC_TOKEN_DIR = '/r' @@ -47,7 +47,7 @@ class NamespaceConfigTest(unittest.TestCase): self.config.account_keys_dir, '/tmp/config/acc/acme-server.org:443/new/keys') self.assertEqual(self.config.backup_dir, '/tmp/foo/backups') - self.assertEqual(self.config.csr_dir, '/tmp/config/csrs') + self.assertEqual(self.config.cert_dir, '/tmp/config/certs') self.assertEqual( self.config.cert_key_backup, '/tmp/foo/c/acme-server.org:443/new') self.assertEqual(self.config.in_progress_dir, '/tmp/foo/../p')