mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-06 11:30:49 +02:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user