Skip to content

Commit 11620ba

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

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
@@ -182,7 +182,7 @@ usage(char * const argv[])
182182
{
183183
fprintf(stderr,
184184
"Usage: %s [-t] [-v] [-T time] [-n nonce_type:type_args] "
185-
"certsdir threadcount\n"
185+
"certsdir [certsdir...] threadcount\n"
186186
"\t-t\tTerse output\n"
187187
"\t-v\tVerbose output. Multiple usage increases verbosity.\n"
188188
"\t-T\tTimeout for the test run in seconds,\n"
@@ -299,12 +299,12 @@ main(int argc, char *argv[])
299299
* load_nonce_from_path can use it later.
300300
*/
301301
nonce_cfg.dirs = argv + dirs_start;
302-
nonce_cfg.num_dirs = 1;
302+
nonce_cfg.num_dirs = argc - 1 - dirs_start;
303303

304-
if (argv[optind] == NULL)
304+
if (optind >= argc)
305305
errx(EXIT_FAILURE, "threadcount is missing");
306306

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

309309
store = X509_STORE_new();
310310
if (store == NULL || !X509_STORE_set_default_paths(store))

0 commit comments

Comments
 (0)