diff --git a/ctaocrypt/test/test.c b/ctaocrypt/test/test.c index 3166bbe43..e43b22d64 100644 --- a/ctaocrypt/test/test.c +++ b/ctaocrypt/test/test.c @@ -1062,7 +1062,7 @@ int hmac_md5_test(void) } #endif /* NO_HMAC && NO_MD5 */ -#ifndef NO_HMAC +#if !defined(NO_HMAC) && !defined(NO_SHA) int hmac_sha_test(void) { Hmac hmac; diff --git a/cyassl/ctaocrypt/sha.h b/cyassl/ctaocrypt/sha.h index aaed8813a..591a86ee0 100644 --- a/cyassl/ctaocrypt/sha.h +++ b/cyassl/ctaocrypt/sha.h @@ -20,6 +20,8 @@ */ +#ifndef NO_SHA + #ifndef CTAO_CRYPT_SHA_H #define CTAO_CRYPT_SHA_H @@ -62,4 +64,5 @@ CYASSL_API void ShaFinal(Sha*, byte*); #endif #endif /* CTAO_CRYPT_SHA_H */ +#endif /* NO_SHA */ diff --git a/cyassl/internal.h b/cyassl/internal.h index 3182e7ec1..bea8bb0ec 100644 --- a/cyassl/internal.h +++ b/cyassl/internal.h @@ -108,6 +108,10 @@ #endif #endif +#ifdef NO_SHA + #define SHA_DIGEST_SIZE 20 +#endif + #ifdef NO_SHA256 #define SHA256_DIGEST_SIZE 32 #endif