Demote PEM generation to logger.debug (#4549)

This commit is contained in:
schoen
2017-04-26 10:54:40 -07:00
committed by Brad Warren
parent b41472afce
commit 0c4e813a72
+4 -4
View File
@@ -54,13 +54,13 @@ def init_save_key(key_size, key_dir, keyname="key-certbot.pem"):
config.strict_permissions) config.strict_permissions)
if config.dry_run: if config.dry_run:
key_path = None key_path = None
logger.info("Generating key (%d bits), not saving to file", key_size) logger.debug("Generating key (%d bits), not saving to file", key_size)
else: else:
key_f, key_path = util.unique_file( key_f, key_path = util.unique_file(
os.path.join(key_dir, keyname), 0o600, "wb") os.path.join(key_dir, keyname), 0o600, "wb")
with key_f: with key_f:
key_f.write(key_pem) key_f.write(key_pem)
logger.info("Generating key (%d bits): %s", key_size, key_path) logger.debug("Generating key (%d bits): %s", key_size, key_path)
return util.Key(key_path, key_pem) return util.Key(key_path, key_pem)
@@ -89,13 +89,13 @@ def init_save_csr(privkey, names, path):
config.strict_permissions) config.strict_permissions)
if config.dry_run: if config.dry_run:
csr_filename = None csr_filename = None
logger.info("Creating CSR: not saving to file") logger.debug("Creating CSR: not saving to file")
else: else:
csr_f, csr_filename = util.unique_file( csr_f, csr_filename = util.unique_file(
os.path.join(path, "csr-certbot.pem"), 0o644, "wb") os.path.join(path, "csr-certbot.pem"), 0o644, "wb")
with csr_f: with csr_f:
csr_f.write(csr_pem) csr_f.write(csr_pem)
logger.info("Creating CSR: %s", csr_filename) logger.debug("Creating CSR: %s", csr_filename)
return util.CSR(csr_filename, csr_pem, "pem") return util.CSR(csr_filename, csr_pem, "pem")