EVP_{CIPHER,MD}_CTX_ctrl(): make sure to return 0 or 1
authorRichard Levitte <levitte@openssl.org>
Sun, 6 Oct 2019 08:45:17 +0000 (10:45 +0200)
committerRichard Levitte <levitte@openssl.org>
Sun, 6 Oct 2019 10:09:03 +0000 (12:09 +0200)
commit552be00d429dc3d6c95bb2d9573b09e67485afb3
tree44331814557c94965139f5ad8b6f971f94d45bc4
parent7cfc0a555c85220ecfd6ed038a7b859668595b72
EVP_{CIPHER,MD}_CTX_ctrl(): make sure to return 0 or 1

Even thought the underlying calls might return something other than 0
or 1, EVP_CIPHER_CTX_ctrl() and EVP_MD_CTX_ctrl() were made to only
return those values regardless.  That behaviour was recently lost, so
we need to restore it.

Fixes #10106

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/10108)
crypto/evp/digest.c
crypto/evp/evp_enc.c