From 032a0405e4960b91a0419600e9778863fb782c9c Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Thu, 29 Feb 2024 14:27:14 -0500 Subject: [PATCH] Get rid of magic number to size structs. --- wolfssl/openssl/sha.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfssl/openssl/sha.h b/wolfssl/openssl/sha.h index c36441498..ab38c5c09 100644 --- a/wolfssl/openssl/sha.h +++ b/wolfssl/openssl/sha.h @@ -27,7 +27,7 @@ #include #include - +#include #ifdef WOLFSSL_PREFIX #include "prefix_sha.h" #endif @@ -151,7 +151,7 @@ typedef WOLFSSL_SHA224_CTX SHA224_CTX; * to Sha256, is expected to also be 16 byte aligned addresses. */ typedef struct WOLFSSL_SHA256_CTX { /* big enough to hold wolfcrypt Sha256, but check on init */ - ALIGN16 void* holder[(274 + CTX_SHA_HW_ADDER + WC_ASYNC_DEV_SIZE) / + ALIGN16 void* holder[sizeof(wc_Sha256) / sizeof(void*)]; #if defined(WOLFSSL_DEVCRYPTO_HASH) || defined(WOLFSSL_HASH_KEEP) ALIGN16 void* keephash_holder[sizeof(void*) + (2 * sizeof(unsigned int))];