Trust RSA_check_key() to return correct values
[openssl.git] / apps / rsa.c
index f67387e27f6facb42aeb8398479fd2bbca3a54a7..bd2f53a6f4fb871b5050d9293d34bbaba70adedc 100644 (file)
@@ -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;
         }