Serial: 587A1CE5ED855040A0C82BF255FF300ADB7C8136
[...]
-show ssl cert [<filename>]
+show ssl cert [[*][\]<filename>]
Display the list of certificates loaded into the process. They are not used
by any frontend or backend until their status is "Used".
If a filename is prefixed by an asterisk, it is a transaction which is not
committed yet. If a filename is specified, it will show details about the
certificate. This command can be useful to check if a certificate was well
updated. You can also display details on a transaction by prefixing the
- filename by an asterisk.
+ filename by a '*'. If the first character of the filename is a '*', it can be
+ escaped with '\*'.
This command can also be used to display the details of a certificate's OCSP
response by suffixing the filename with a ".ocsp" extension. It works for
committed certificates as well as for ongoing transactions. On a committed
Status: Unused
[...]
+ $ echo "@1 show ssl cert \*.local.pem" | socat /var/run/haproxy.master -
+ Filename: *.local.pem
+ Status: Used
+ [...]
+
show ssl crl-file [<crlfile>[:<index>]]
Display the list of CRL files loaded into the process. They are not used
by any frontend or backend until their status is "Used".
#endif
}
-/* parsing function for 'show ssl cert [certfile]' */
+/* parsing function for 'show ssl cert [[*][\]<certfile>]' */
static int cli_parse_show_cert(char **args, char *payload, struct appctx *appctx, void *private)
{
struct show_cert_ctx *ctx = applet_reserve_svcctx(appctx, sizeof(*ctx));
}
if (*args[3] == '*') {
+ char *filename = args[3]+1;
+
from_transaction = 1;
if (!ckchs_transaction.new_ckchs)
goto error;
ckchs = ckchs_transaction.new_ckchs;
- if (strcmp(args[3] + 1, ckchs->path) != 0)
+ if (filename[0] == '\\')
+ filename++;
+
+ if (strcmp(filename, ckchs->path) != 0)
goto error;
} else {
- if ((ckchs = ckchs_lookup(args[3])) == NULL)
+ char *filename = args[3];
+
+ if (filename[0] == '\\')
+ filename++;
+
+ if ((ckchs = ckchs_lookup(filename)) == NULL)
goto error;
}