switch (o) {
case OPT_EOF:
case OPT_ERR:
+opthelp:
BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
goto end;
case OPT_HELP:
}
argc = opt_num_rest();
argv = opt_rest();
- private = 1;
- if (argv[0] && (!opt_int(argv[0], &num) || num <= 0))
- goto end;
+ if (argc == 1) {
+ if (!opt_int(argv[0], &num) || num <= 0)
+ goto end;
+ } else if (argc > 0) {
+ BIO_printf(bio_err, "Extra arguments given.\n");
+ goto opthelp;
+ }
+ private = 1;
if (!app_passwd(NULL, passoutarg, NULL, &passout)) {
BIO_printf(bio_err, "Error getting password\n");
goto end;