mirror of
https://github.com/laurivosandi/certidude
synced 2025-09-07 14:11:05 +00:00
authoriy: Fix revoked certificate filenames
This commit is contained in:
@@ -399,8 +399,9 @@ def _sign(csr, buf, profile, skip_notify=False, skip_push=False, overwrite=False
|
|||||||
|
|
||||||
if overwrite:
|
if overwrite:
|
||||||
# TODO: is this the best approach?
|
# TODO: is this the best approach?
|
||||||
|
# TODO: why didn't unittest detect bugs here?
|
||||||
prev_serial_hex = "%x" % prev.serial_number
|
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)
|
os.rename(cert_path, revoked_path)
|
||||||
attachments += [(prev_buf, "application/x-pem-file", "deprecated.crt" if renew else "overwritten.crt")]
|
attachments += [(prev_buf, "application/x-pem-file", "deprecated.crt" if renew else "overwritten.crt")]
|
||||||
overwritten = True
|
overwritten = True
|
||||||
|
Reference in New Issue
Block a user