From 87b8f17047f890140fc5ea73043d3f30277b18c3 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 1 Feb 2015 11:55:55 +0100 Subject: [PATCH] sysdb: Add -A option to specify a CA certificates file. --- src/tools/sysdb/main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tools/sysdb/main.c b/src/tools/sysdb/main.c index 228cd53..e9e2202 100644 --- a/src/tools/sysdb/main.c +++ b/src/tools/sysdb/main.c @@ -132,6 +132,8 @@ exit_usage(char *name, int status) " default: %s\n" " -C CERTFILE client certificate file name\n" " default: %s\n" +" -A CAFILE CA certificates file name\n" +" default: %s\n" "\n" "General options:\n" "\n" @@ -140,7 +142,7 @@ exit_usage(char *name, int status) "\nSysDB client "SDB_CLIENT_VERSION_STRING SDB_CLIENT_VERSION_EXTRA", " PACKAGE_URL"\n", basename(name), user, - ssl_options.key_file, ssl_options.cert_file); + ssl_options.key_file, ssl_options.cert_file, ssl_options.ca_file); free(user); exit(status); @@ -227,7 +229,7 @@ main(int argc, char **argv) sdb_llist_t *commands = NULL; while (42) { - int opt = getopt(argc, argv, "H:U:c:C:K:hV"); + int opt = getopt(argc, argv, "H:U:c:C:K:A:hV"); if (-1 == opt) break; @@ -270,6 +272,9 @@ main(int argc, char **argv) case 'K': ssl_options.key_file = optarg; break; + case 'A': + ssl_options.ca_file = optarg; + break; case 'h': exit_usage(argv[0], 0); -- 2.30.2