evp: fix return code check.
authorPauli <pauli@openssl.org>
Mon, 10 May 2021 04:13:30 +0000 (14:13 +1000)
committerPauli <pauli@openssl.org>
Wed, 12 May 2021 01:11:53 +0000 (11:11 +1000)
commit0df56c30f7ad1d29bac5ed2546069402d6219c15
treef93719459aa0a91548396d0b0b53e3b5715260db
parent4885ecffc7857a3eb4ef580763b1200cbaf9f45e
evp: fix return code check.

The return from evp_do_md_getparams() is 0 for failure and -1 for not being
a provided algorithm.  The code in evp_md_cache_constants() failed to check
the return code properly.  In this case it was harmless but better to fix it.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/15208)
crypto/evp/digest.c