From c01cd279c3770eecce12f2e9723bca5dccba8024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Mon, 7 May 2018 07:44:20 +0000 Subject: [PATCH] authoriy: Fix revoked certificate filenames --- certidude/authority.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/certidude/authority.py b/certidude/authority.py index 111a2d9..5066edb 100644 --- a/certidude/authority.py +++ b/certidude/authority.py @@ -399,8 +399,9 @@ def _sign(csr, buf, profile, skip_notify=False, skip_push=False, overwrite=False if overwrite: # TODO: is this the best approach? + # TODO: why didn't unittest detect bugs here? prev_serial_hex = "%x" % prev.serial_number - revoked_path = os.path.join(config.REVOKED_DIR, "%s.pem" % prev_serial_hex) + revoked_path = os.path.join(config.REVOKED_DIR, "%040x.pem" % prev.serial_number) os.rename(cert_path, revoked_path) attachments += [(prev_buf, "application/x-pem-file", "deprecated.crt" if renew else "overwritten.crt")] overwritten = True