Fix a bundle of mischecks of return values
authorPaul Yang <kaishen.yy@antfin.com>
Mon, 30 Sep 2019 06:05:31 +0000 (14:05 +0800)
committerPaul Yang <kaishen.yy@antfin.com>
Mon, 30 Sep 2019 09:19:05 +0000 (17:19 +0800)
commitf5517d95217fb5ec152a70be7fc4f399925efeb2
treec1b1ca7eeadf6a18e58c690f5d83782b14e88cd9
parent312674e5148a44843202040006f47fc374902f88
Fix a bundle of mischecks of return values

Several EVP_PKEY_xxxx functions return 0 and a negative value for
indicating errors. Some places call these functions with a zero return
value check only, which misses the check for the negative scenarios.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10055)

(cherry picked from commit 7e3ae24832e0705583b1471febf3dc0eb1cc021f)
apps/speed.c
crypto/cms/cms_kari.c