HTTP client: Fix cleanup of TLS BIO via 'bio_update_fn' callback function
[openssl.git] / apps / x509.c
index 28fa769a01ea7bcdd75c7c70b376b79899229bf8..188bc17a09ff87333f2737166afb2fa399ad09b9 100644 (file)
@@ -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;