aboutsummaryrefslogtreecommitdiffstats
path: root/apps/x509.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/x509.c')
-rw-r--r--apps/x509.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 28fa769a01..188bc17a09 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -594,13 +594,15 @@ int x509_main(int argc, char **argv)
}
/* No extra arguments. */
- argc = opt_num_rest();
- if (argc != 0)
+ if (!opt_check_rest_arg(NULL))
goto opthelp;
if (!app_RAND_load())
goto end;
+ if (!opt_check_md(digest))
+ goto opthelp;
+
if (preserve_dates && days != UNSET_DAYS) {
BIO_printf(bio_err, "Cannot use -preserve_dates with -days option\n");
goto err;