add CliRunner.list_certs()

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Vlad Doloman
2026-07-08 16:21:24 +03:00
parent 444e35f8cd
commit 3c4eef6bb0
2 changed files with 46 additions and 0 deletions

View File

@@ -1315,6 +1315,11 @@ class CliRunner:
sys.exit(1)
print(f"CRL updated → {CRL_DEST_PATH}")
def list_certs(self, show_all: bool) -> None:
certs = (load_all_certs(EASYRSA_PKI_DIR) if show_all
else load_expiring_certs(EASYRSA_PKI_DIR, DAYS_PAST, DAYS_AHEAD))
print(_format_cert_table(certs))
def _issue(self, cn: str, email_addr: str, is_renewal: bool,
send_email_flag: bool = True, show_eml: bool = False) -> None:
password = generate_password()