APPS: Improve diagnostics on missing/extra args and unknown cipher/digest
[openssl.git] / apps / mac.c
index 08f06be867859bd760ea5212ca8dade9a7853941..8bd7ce23977bf66654eaffaff230a9b9fe08afbf 100644 (file)
@@ -137,10 +137,9 @@ opthelp:
     }
 
     /* One argument, the MAC name. */
-    argc = opt_num_rest();
-    argv = opt_rest();
-    if (argc != 1)
+    if (!opt_check_rest_arg("MAC name"))
         goto opthelp;
+    argv = opt_rest();
 
     mac = EVP_MAC_fetch(app_get0_libctx(), argv[0], app_get0_propq());
     if (mac == NULL) {