summaryrefslogtreecommitdiffstats
path: root/apps/pkeyparam.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-01-21 12:36:58 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-02-22 08:49:52 +0100
commit7f90026b3fca9cfd3d9098d358d949d37509a2e5 (patch)
treed91a6f22702f8977560f7ffec75ac0e10e942bc9 /apps/pkeyparam.c
parent4718326a46ad460fefc5cc240a8599af4b5993c7 (diff)
Handle NULL result of ERR_reason_error_string() in some apps
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13920)
Diffstat (limited to 'apps/pkeyparam.c')
-rw-r--r--apps/pkeyparam.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/pkeyparam.c b/apps/pkeyparam.c
index 42de552753..ef1a082d62 100644
--- a/apps/pkeyparam.c
+++ b/apps/pkeyparam.c
@@ -52,7 +52,6 @@ int pkeyparam_main(int argc, char **argv)
int text = 0, noout = 0, ret = EXIT_FAILURE, check = 0, r;
OPTION_CHOICE o;
char *infile = NULL, *outfile = NULL, *prog;
- unsigned long err;
prog = opt_init(argc, argv, pkeyparam_options);
while ((o = opt_next()) != OPT_EOF) {
@@ -125,13 +124,8 @@ int pkeyparam_main(int argc, char **argv)
* Note: at least for RSA keys if this function returns
* -1, there will be no error reasons.
*/
- BIO_printf(out, "Parameters are invalid\n");
-
- while ((err = ERR_peek_error()) != 0) {
- BIO_printf(out, "Detailed error: %s\n",
- ERR_reason_error_string(err));
- ERR_get_error(); /* remove err from error stack */
- }
+ BIO_printf(bio_err, "Parameters are invalid\n");
+ ERR_print_errors(bio_err);
goto end;
}
}