Skip to content

Commit 0b3b091

Browse files
committed
x509storeissuer: support providing multiple certificate directories
Signed-off-by: Eugene Syromiatnikov <[email protected]>
1 parent 3924835 commit 0b3b091

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/x509storeissuer.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ usage(char * const argv[])
184184
{
185185
fprintf(stderr,
186186
"Usage: %s [-t] [-v] [-T time] [-n nonce_type:type_args] "
187-
"certsdir threadcount\n"
187+
"certsdir [certsdir...] threadcount\n"
188188
"\t-t\tTerse output\n"
189189
"\t-v\tVerbose output. Multiple usage increases verbosity.\n"
190190
"\t-T\tTimeout for the test run in seconds,\n"
@@ -301,12 +301,12 @@ main(int argc, char *argv[])
301301
* load_nonce_from_path can use it later.
302302
*/
303303
nonce_cfg.dirs = argv + dirs_start;
304-
nonce_cfg.num_dirs = 1;
304+
nonce_cfg.num_dirs = argc - 1 - dirs_start;
305305

306-
if (argv[optind] == NULL)
306+
if (optind >= argc)
307307
errx(EXIT_FAILURE, "threadcount is missing");
308308

309-
threadcount = parse_int(argv[optind], 1, INT_MAX, "threadcount");
309+
threadcount = parse_int(argv[argc - 1], 1, INT_MAX, "threadcount");
310310

311311
store = X509_STORE_new();
312312
if (store == NULL || !X509_STORE_set_default_paths(store))

0 commit comments

Comments
 (0)