From 4abedc3fb0f01a06427e1f78e38f0ef6adc5f0b2 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Mon, 16 Dec 2024 17:39:20 +0100 Subject: [PATCH] MINOR: ssl/cli: add a 'Uncommitted' status for 'show ssl' commands Add a 'Uncommitted' status for 'show ssl' commands on the 'Status' line when accessing a non-empty and uncommitted SSL transaction. Available with: - show ssl cert - show ssl ca-file - show ssl crl-file --- src/ssl_ckch.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index c2d3640dd..75b04db88 100644 --- a/src/ssl_ckch.c +++ b/src/ssl_ckch.c @@ -2130,6 +2130,8 @@ static int cli_io_handler_show_cert_detail(struct appctx *appctx) chunk_appendf(out, "Status: "); if (ckchs->data->cert == NULL) chunk_appendf(out, "Empty\n"); + else if (ckchs == ckchs_transaction.new_ckchs) + chunk_appendf(out, "Uncommitted\n"); else if (LIST_ISEMPTY(&ckchs->ckch_inst)) chunk_appendf(out, "Unused\n"); else @@ -3539,6 +3541,8 @@ static int cli_io_handler_show_cafile_detail(struct appctx *appctx) chunk_appendf(out, "Status: "); if (!cafile_entry->ca_store) chunk_appendf(out, "Empty\n"); + else if (cafile_entry == cafile_transaction.new_cafile_entry) + chunk_appendf(out, "Uncommitted\n"); else if (LIST_ISEMPTY(&cafile_entry->ckch_inst_link)) chunk_appendf(out, "Unused\n"); else @@ -4226,6 +4230,8 @@ static int cli_io_handler_show_crlfile_detail(struct appctx *appctx) chunk_appendf(out, "Status: "); if (!cafile_entry->ca_store) chunk_appendf(out, "Empty\n"); + else if (cafile_entry == crlfile_transaction.new_crlfile_entry) + chunk_appendf(out, "Uncommitted\n"); else if (LIST_ISEMPTY(&cafile_entry->ckch_inst_link)) chunk_appendf(out, "Unused\n"); else