APPS: Improve diagnostics on missing/extra args and unknown cipher/digest
[openssl.git] / apps / storeutl.c
index 1368caae92df17d74a8e72d22b535680b895e684..8d1ce3cea338393bcf9f5a203b18df7f054f8f9e 100644 (file)
@@ -258,15 +258,12 @@ int storeutl_main(int argc, char *argv[])
     }
 
     /* One argument, the URI */
-    argc = opt_num_rest();
-    argv = opt_rest();
-    if (argc != 1)
+    if (!opt_check_rest_arg("URI"))
         goto opthelp;
+    argv = opt_rest();
 
-    if (digestname != NULL) {
-        if (!opt_md(digestname, &digest))
-            goto opthelp;
-    }
+    if (!opt_md(digestname, &digest))
+        goto opthelp;
 
     if (criterion != 0) {
         switch (criterion) {