|
1 | 1 | /***
|
2 | 2 | * Copyright 2018-2020 HAProxy Technologies
|
| 3 | + * Copyright 2021 Verizon Media, Pierre Belanger |
3 | 4 | *
|
4 | 5 | * This file is part of spoa-mirror.
|
5 | 6 | *
|
@@ -64,6 +65,7 @@ static void usage(const char *program_name, bool_t flag_verbose)
|
64 | 65 | (void)printf(" -B, --libev-backend=TYPE Specify the libev backend type (default: AUTO).\n");
|
65 | 66 | (void)printf(" -b, --connection-backlog=VALUE Specify the connection backlog size (default: %d).\n", DEFAULT_CONNECTION_BACKLOG);
|
66 | 67 | (void)printf(" -c, --capability=NAME Enable the support of the specified capability.\n");
|
| 68 | + (void)printf(" -C, --client-certfile=FILE Specifies a PEM file to use as client certificate.\n"); |
67 | 69 | (void)printf(" -D, --daemonize Run this program as a daemon.\n");
|
68 | 70 | #ifdef DEBUG
|
69 | 71 | (void)printf(" -d, --debug=LEVEL Enable and specify the debug mode level (default: %d).\n", DEFAULT_DEBUG_LEVEL);
|
@@ -348,6 +350,7 @@ int main(int argc, char **argv, char **envp __maybe_unused)
|
348 | 350 | { "libev-backend", required_argument, NULL, 'B' },
|
349 | 351 | { "connection-backlog", required_argument, NULL, 'b' },
|
350 | 352 | { "capability", required_argument, NULL, 'c' },
|
| 353 | + { "client-certfile", required_argument, NULL, 'C' }, |
351 | 354 | { "daemonize", no_argument, NULL, 'D' },
|
352 | 355 | { "debug", required_argument, NULL, 'd' },
|
353 | 356 | { "pidfile", required_argument, NULL, 'F' },
|
@@ -394,6 +397,8 @@ int main(int argc, char **argv, char **envp __maybe_unused)
|
394 | 397 | cfg.connection_backlog = atoi(optarg);
|
395 | 398 | else if (c == 'c')
|
396 | 399 | flag_error |= _OK(getopt_set_capability(optarg)) ? 0 : 1;
|
| 400 | + else if (c == 'C') |
| 401 | + cfg.client_certfile = optarg; |
397 | 402 | else if (c == 'D')
|
398 | 403 | cfg.opt_flags |= FLAG_OPT_DAEMONIZE;
|
399 | 404 | #ifdef DEBUG
|
|
0 commit comments