]> git.ipfire.org Git - thirdparty/openssl.git/commit
Replace size_t with int and add the check for the EVP_MD_get_size()
authorJiasheng Jiang <jiasheng@purdue.edu>
Thu, 21 Mar 2024 20:22:01 +0000 (20:22 +0000)
committerTomas Mraz <tomas@openssl.org>
Mon, 25 Mar 2024 16:49:03 +0000 (17:49 +0100)
commit87e747000fef07c9ec43877bc5e9f2ca34f76a3b
treeda1bbe963ea1386820e29ceb99676722d92b99e8
parentf13ddaab69def0b453b75a8f2deb80e1f1634f42
Replace size_t with int and add the check for the EVP_MD_get_size()

Replace the type of "digest_size" with int to avoid implicit conversion when it is assigned by EVP_MD_get_size().
Moreover, add the check for the "digest_size".

Fixes: 29ce1066bc ("Update the demos/README file because it is really old. New demos should provide best practice for API use. Add demonstration for computing a SHA3-512 digest - digest/EVP_MD_demo")
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23924)
demos/digest/BIO_f_md.c