From: William Lallemand Date: Mon, 16 Dec 2024 16:39:20 +0000 (+0100) Subject: MINOR: ssl/cli: add a 'Uncommitted' status for 'show ssl' commands X-Git-Tag: v3.2-dev2~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4abedc3fb0f01a06427e1f78e38f0ef6adc5f0b2;p=thirdparty%2Fhaproxy.git 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 --- diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index c2d3640dd4..75b04db88e 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