提交 e0e68f9e 编写于 作者: R Rich Salz 提交者: Dr. Matthias St. Pierre

Tweak option error messages

Better messages for unknown option, unknown cipher, unknown digest.

Fixes #10773
Reviewed-by: NDmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: NPaul Dale <paul.dale@oracle.com>
Reviewed-by: NMatthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10774)
上级 7671420d
......@@ -288,7 +288,7 @@ int opt_cipher(const char *name, const EVP_CIPHER **cipherp)
*cipherp = EVP_get_cipherbyname(name);
if (*cipherp != NULL)
return 1;
opt_printf_stderr("%s: Unrecognized flag %s\n", prog, name);
opt_printf_stderr("%s: Unknown cipher: %s\n", prog, name);
return 0;
}
......@@ -300,7 +300,7 @@ int opt_md(const char *name, const EVP_MD **mdp)
*mdp = EVP_get_digestbyname(name);
if (*mdp != NULL)
return 1;
opt_printf_stderr("%s: Unrecognized flag %s\n", prog, name);
opt_printf_stderr("%s: Unknown message digest: %s\n", prog, name);
return 0;
}
......@@ -762,7 +762,7 @@ int opt_next(void)
dunno = p;
return unknown->retval;
}
opt_printf_stderr("%s: Option unknown option -%s\n", prog, p);
opt_printf_stderr("%s: Unknown option: -%s\n", prog, p);
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册