summaryrefslogtreecommitdiffstats
path: root/apps/enc.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-01-07 09:00:02 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-01-11 19:39:49 +0100
commit3372039252c4d9c67de784a0fbdad5589991a347 (patch)
tree687417a67e1027ce1d90cd448b0b03b05a8e90df /apps/enc.c
parent046a7aaa5e3c398b19fcdb5b486d57ab9c6ced30 (diff)
APPS: Fix confusion between program and app/command name used in diagnostic/help output
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/13799)
Diffstat (limited to 'apps/enc.c')
-rw-r--r--apps/enc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/enc.c b/apps/enc.c
index f97621b1a6..42b14d4993 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -112,7 +112,7 @@ int enc_main(int argc, char **argv)
const EVP_CIPHER *cipher = NULL, *c;
const EVP_MD *dgst = NULL;
char *hkey = NULL, *hiv = NULL, *hsalt = NULL, *p;
- char *infile = NULL, *outfile = NULL, *prog;
+ char *infile = NULL, *outfile = NULL, *prog, *arg0;
char *str = NULL, *passarg = NULL, *pass = NULL, *strbuf = NULL;
char mbuf[sizeof(magic) - 1];
OPTION_CHOICE o;
@@ -131,18 +131,18 @@ int enc_main(int argc, char **argv)
BIO *bzl = NULL;
#endif
- /* first check the program name */
- prog = opt_progname(argv[0]);
- if (strcmp(prog, "base64") == 0) {
+ /* first check the command name */
+ arg0 = argv[0];
+ if (strcmp(arg0, "base64") == 0) {
base64 = 1;
#ifdef ZLIB
- } else if (strcmp(prog, "zlib") == 0) {
+ } else if (strcmp(arg0, "zlib") == 0) {
do_zlib = 1;
#endif
} else {
- cipher = EVP_get_cipherbyname(prog);
- if (cipher == NULL && strcmp(prog, "enc") != 0) {
- BIO_printf(bio_err, "%s is not a known cipher\n", prog);
+ cipher = EVP_get_cipherbyname(arg0);
+ if (cipher == NULL && strcmp(arg0, "enc") != 0) {
+ BIO_printf(bio_err, "%s is not a known cipher\n", arg0);
goto end;
}
}