Trust RSA_check_key() to return correct values
In apps/rsa.c, we were second guessing RSA_check_key() to leave error codes lying around without returning -1 properly. However, this also catches other errors that are lying around and that we should not care about. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
55d83bf7c1
commit
63db6b772f
1 changed files with 1 additions and 4 deletions
|
@ -230,10 +230,7 @@ int rsa_main(int argc, char **argv)
|
|||
ERR_reason_error_string(err));
|
||||
ERR_get_error(); /* remove e from error stack */
|
||||
}
|
||||
}
|
||||
|
||||
/* should happen only if r == -1 */
|
||||
if (r == -1 || ERR_peek_error() != 0) {
|
||||
} else if (r == -1) {
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue