mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-17 20:45:40 +00:00
MINOR: ssl/cli: display more filenames in 'show ssl cert'
"show ssl cert <file>" only displays a unique filename, which is the key used in the ckch_store tree. This patch extends it by displaying every filenames from the ckch_conf that can be configured with the crt-store. In order to be more consistant, some changes are needed in the future: - we need to store the complete path in the ckch_conf (meaning with crt-path or key-path) - we need to fill a ckch_conf in cases the files are autodiscovered
This commit is contained in:
parent
5a7cbb8d81
commit
0c0b38d64c
@ -2128,6 +2128,27 @@ static int cli_io_handler_show_cert_detail(struct appctx *appctx)
|
||||
chunk_appendf(out, "*");
|
||||
chunk_appendf(out, "%s\n", ckchs->path);
|
||||
|
||||
if (ckchs->conf.crt) {
|
||||
chunk_appendf(out, "Crt filename: ");
|
||||
chunk_appendf(out, "%s\n", ckchs->conf.crt);
|
||||
}
|
||||
if (ckchs->conf.key) {
|
||||
chunk_appendf(out, "Key filename: ");
|
||||
chunk_appendf(out, "%s\n", ckchs->conf.key);
|
||||
}
|
||||
if (ckchs->conf.ocsp) {
|
||||
chunk_appendf(out, "OCSP filename: ");
|
||||
chunk_appendf(out, "%s\n", ckchs->conf.ocsp);
|
||||
}
|
||||
if (ckchs->conf.issuer) {
|
||||
chunk_appendf(out, "OCSP Issuer filename: ");
|
||||
chunk_appendf(out, "%s\n", ckchs->conf.issuer);
|
||||
}
|
||||
if (ckchs->conf.sctl) {
|
||||
chunk_appendf(out, "SCTL filename: ");
|
||||
chunk_appendf(out, "%s\n", ckchs->conf.sctl);
|
||||
}
|
||||
|
||||
chunk_appendf(out, "Status: ");
|
||||
if (ckchs->data->cert == NULL)
|
||||
chunk_appendf(out, "Empty\n");
|
||||
|
Loading…
Reference in New Issue
Block a user