cheri: Increase OpenSSL compat holder sizes for MD5, SHA and RC4

wc_Md5, wc_Sha & Arc4 have all increased in size on CHERI

Signed-off-by: William Beasley (The Capable Hub) <wbeasley@thegoodpenguin.co.uk>
This commit is contained in:
William Beasley (The Capable Hub)
2026-05-05 12:17:05 +01:00
parent fd59db0a32
commit 225d1beda8
3 changed files with 16 additions and 0 deletions
+8
View File
@@ -43,9 +43,17 @@
typedef struct WOLFSSL_MD5_CTX {
/* big enough to hold wolfcrypt md5, but check on init */
#ifdef STM32_HASH
# ifdef WC_NO_PTR_INT_CAST
void* holder[(128 + WC_ASYNC_DEV_SIZE + sizeof(STM32_HASH_Context)) / sizeof(void*)];
# else
void* holder[(112 + WC_ASYNC_DEV_SIZE + sizeof(STM32_HASH_Context)) / sizeof(void*)];
# endif
#else
# ifdef WC_NO_PTR_INT_CAST
void* holder[(128 + WC_ASYNC_DEV_SIZE) / sizeof(void*)];
# else
void* holder[(112 + WC_ASYNC_DEV_SIZE) / sizeof(void*)];
# endif
#endif
} WOLFSSL_MD5_CTX;
+4
View File
@@ -39,7 +39,11 @@
* the size of RC4_KEY structures. */
typedef struct WOLFSSL_RC4_KEY {
/* big enough for Arc4 from wolfssl/wolfcrypt/arc4.h */
#ifdef WC_NO_PTR_INT_CAST
void* holder[(288 + WC_ASYNC_DEV_SIZE) / sizeof(void*)];
#else
void* holder[(272 + WC_ASYNC_DEV_SIZE) / sizeof(void*)];
#endif
} WOLFSSL_RC4_KEY;
WOLFSSL_API void wolfSSL_RC4_set_key(WOLFSSL_RC4_KEY* key, int len,
+4
View File
@@ -52,7 +52,11 @@
#ifndef NO_SHA
typedef struct WOLFSSL_SHA_CTX {
/* big enough to hold wolfcrypt Sha, but check on init */
#ifdef WC_NO_PTR_INT_CAST
void* holder[(160 + WC_ASYNC_DEV_SIZE + CTX_SHA_HW_ADDER) / sizeof(void*)];
#else
void* holder[(112 + WC_ASYNC_DEV_SIZE + CTX_SHA_HW_ADDER) / sizeof(void*)];
#endif
#if defined(WOLFSSL_DEVCRYPTO_HASH) || defined(WOLFSSL_HASH_KEEP)
void* keephash_holder[sizeof(void*) + (2 * sizeof(unsigned int))];
#endif