From 493a9dab30fe1ce133c7123f7122dc07d890f106 Mon Sep 17 00:00:00 2001 From: Benjamin Collet Date: Mon, 20 Jan 2025 20:32:53 +0100 Subject: [PATCH] Fix issue with ssh certs with less than 2 principals --- step-ca-inspector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/step-ca-inspector.py b/step-ca-inspector.py index 577559f..2841b5d 100755 --- a/step-ca-inspector.py +++ b/step-ca-inspector.py @@ -41,6 +41,8 @@ def list_ssh_certs(sort_key, revoked=False, expired=False): principals_list = [x.decode() for x in cert.principals] if principals_count > 2: principals = principals_list[:2] + [f"+{principals_count - 2} more"] + else: + principals = principals_list cert_row["Principals"] = "\n".join(principals) now_with_tz = datetime.utcnow().replace(