projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea987ed
)
MINOR: ssl/cli: show certificate status in 'show ssl cert'
author
William Lallemand
<wlallemand@haproxy.com>
Thu, 19 Mar 2020 19:26:02 +0000
(20:26 +0100)
committer
William Lallemand
<wlallemand@haproxy.org>
Thu, 19 Mar 2020 19:36:13 +0000
(20:36 +0100)
Display the status of the certificate in 'show ssl cert'.
Example:
Status: Empty
Status: Unused
Status: Used
src/ssl_sock.c
patch
|
blob
|
history
diff --git
a/src/ssl_sock.c
b/src/ssl_sock.c
index
83bbaca
..
a92f9c9
100644
(file)
--- a/
src/ssl_sock.c
+++ b/
src/ssl_sock.c
@@
-11254,6
+11254,14
@@
static int cli_io_handler_show_cert_detail(struct appctx *appctx)
chunk_appendf(out, "*");
chunk_appendf(out, "%s\n", ckchs->path);
+ chunk_appendf(out, "Status: ");
+ if (ckchs->ckch->cert == NULL)
+ chunk_appendf(out, "Empty\n");
+ else if (LIST_ISEMPTY(&ckchs->ckch_inst))
+ chunk_appendf(out, "Unused\n");
+ else
+ chunk_appendf(out, "Used\n");
+
if (ckchs->ckch->cert == NULL)
goto end;