From e256951eab4cc44367f8cc7bd2a51eeaacc10f7d Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sun, 16 Jan 2022 07:57:02 +0100 Subject: cli: add --list-config option With this option gnutls-cli prints the build-time configuration of the library, retrieved through gnutls_get_library_config. Signed-off-by: Daiki Ueno --- src/cli.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cli.c') diff --git a/src/cli.c b/src/cli.c index 09f7efc2c3..5378b72256 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1640,6 +1640,15 @@ static void cmd_parser(int argc, char **argv) exit(1); } + if (HAVE_OPT(LIST_CONFIG)) { + const gnutls_library_config_st *p; + + for (p = gnutls_get_library_config(); p->name; p++) { + log_msg(stdout, "%s: %s\n", p->name, p->value); + } + exit(0); + } + if (HAVE_OPT(BENCHMARK_CIPHERS)) { benchmark_cipher(OPT_VALUE_DEBUG); exit(0); -- cgit v1.2.1