openssl/demos/digest
Jiasheng Jiang ba3b33751d 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)

(cherry picked from commit 87e747000f)
2024-03-25 17:51:57 +01:00
..
BIO_f_md.c Replace size_t with int and add the check for the EVP_MD_get_size() 2024-03-25 17:51:57 +01:00
EVP_MD_demo.c Replace unsigned with int 2024-03-25 17:46:34 +01:00
EVP_MD_stdin.c Replace unsigned with int 2024-03-25 17:46:34 +01:00
EVP_MD_xof.c Copyright year updates 2023-09-07 09:59:15 +01:00
Makefile Create hierarchical demo Makefile. 2023-10-25 09:21:07 +01:00