]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - apps/cmp.c
APPS: Fix confusion between program and app/command name used in diagnostic/help...
[thirdparty/openssl.git] / apps / cmp.c
index a484234f9078bb8636e348deba24ab12a798a9ee..b28b7431ced524af97c7bd76bbd4775ed8d49288 100644 (file)
@@ -42,6 +42,7 @@
 #include <openssl/objects.h>
 #include <openssl/x509.h>
 
+static char *prog;
 static char *opt_config = NULL;
 #define CMP_SECTION "cmp"
 #define SECTION_NAME_MAX 40 /* max length of section name */
@@ -49,10 +50,6 @@ static char *opt_config = NULL;
 static char *opt_section = CMP_SECTION;
 static int opt_verbosity = OSSL_CMP_LOG_INFO;
 
-#undef PROG
-#define PROG cmp_main
-static char *prog = "cmp";
-
 static int read_config(void);
 
 static CONF *conf = NULL; /* OpenSSL config file context structure */
@@ -2625,6 +2622,7 @@ int cmp_main(int argc, char **argv)
     int ret = 0; /* default: failure */
 
     if (argc <= 1) {
+        prog = opt_appname(argv[0]);
         opt_help(cmp_options);
         goto err;
     }