mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
Merge pull request #9028 from dgarske/md5_sha1
Fixes for building with MD5 and SHA1 to support Hash `WC_HASH_TYPE_MD5_SHA`
This commit is contained in:
@@ -214,9 +214,9 @@ int test_wc_HashInit(void)
|
||||
|
||||
for (i = 0; i < notSupportedHashLen; i++) {
|
||||
/* check for null ptr */
|
||||
ExpectIntEQ(wc_HashInit(NULL, supportedHash[i]),
|
||||
ExpectIntEQ(wc_HashInit(NULL, notSupportedHash[i]),
|
||||
WC_NO_ERR_TRACE(BAD_FUNC_ARG));
|
||||
ExpectIntEQ(wc_HashInit_ex(NULL, supportedHash[i], HEAP_HINT,
|
||||
ExpectIntEQ(wc_HashInit_ex(NULL, notSupportedHash[i], HEAP_HINT,
|
||||
INVALID_DEVID), WC_NO_ERR_TRACE(BAD_FUNC_ARG));
|
||||
|
||||
ExpectIntEQ(wc_HashInit(&hash, notSupportedHash[i]),
|
||||
|
@@ -137,6 +137,9 @@ typedef struct {
|
||||
#elif defined(WOLFSSL_SHA384)
|
||||
#define WC_MAX_DIGEST_SIZE WC_SHA384_DIGEST_SIZE
|
||||
#define WC_MAX_BLOCK_SIZE WC_SHA384_BLOCK_SIZE
|
||||
#elif !defined(NO_SHA) && !defined(NO_MD5)
|
||||
#define WC_MAX_DIGEST_SIZE (WC_SHA_DIGEST_SIZE + WC_MD5_DIGEST_SIZE)
|
||||
#define WC_MAX_BLOCK_SIZE WC_SHA_BLOCK_SIZE
|
||||
#elif !defined(NO_SHA256)
|
||||
#define WC_MAX_DIGEST_SIZE WC_SHA256_DIGEST_SIZE
|
||||
#define WC_MAX_BLOCK_SIZE WC_SHA256_BLOCK_SIZE
|
||||
|
Reference in New Issue
Block a user