diff options
author | Daiki Ueno <ueno@gnu.org> | 2022-01-16 07:57:02 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2022-01-17 16:57:21 +0100 |
commit | e256951eab4cc44367f8cc7bd2a51eeaacc10f7d (patch) | |
tree | 666f64e885bb22dd43a89ed9e583680eb6f8c6ce | |
parent | 53bd182ef262be22ad4fc3bcba33a0ca64e7e6c3 (diff) | |
download | gnutls-e256951eab4cc44367f8cc7bd2a51eeaacc10f7d.tar.gz |
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 <ueno@gnu.org>
-rw-r--r-- | src/cli.c | 9 | ||||
-rw-r--r-- | src/gnutls-cli-options.json | 7 |
2 files changed, 15 insertions, 1 deletions
@@ -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); diff --git a/src/gnutls-cli-options.json b/src/gnutls-cli-options.json index 0777e6b198..bffa18e365 100644 --- a/src/gnutls-cli-options.json +++ b/src/gnutls-cli-options.json @@ -387,6 +387,11 @@ "desc": "Reports the status of the FIPS140-2 mode in gnutls library" }, { + "detail": "", + "long-option": "list-config", + "desc": "Reports the configuration of the library" + }, + { "desc": "Redirect informational messages to a specific file.", "arg-type": "string", "long-option": "logfile", @@ -418,4 +423,4 @@ } ] } -]
\ No newline at end of file +] |