Commit 63db6b77 authored by Richard Levitte's avatar Richard Levitte Committed by Matt Caswell
Browse files

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: default avatarRich Salz <rsalz@openssl.org>
parent 55d83bf7
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;
        }