diff --git a/src/opnsense/scripts/system/certctl.py b/src/opnsense/scripts/system/certctl.py index c82064b6c..535a05356 100755 --- a/src/opnsense/scripts/system/certctl.py +++ b/src/opnsense/scripts/system/certctl.py @@ -76,7 +76,7 @@ def cmd_rehash(): continue cert = get_cert(filename) if cert: - nhash = hex(cert.subject_name_hash()).lstrip('0x') + nhash = hex(cert.subject_name_hash()).lstrip('0x').zfill(8) if nhash not in targets[targetname]: targets[targetname][nhash] = [] targets[targetname][nhash].append(filename)