Skip to content

Commit bfc4f6b

Browse files
authored
Merge pull request #9677 from dgarske/riscv_sha512
Fix for building RISC-V 64-bit without SHA512
2 parents d98bbf1 + 214b3c2 commit bfc4f6b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

wolfcrypt/src/port/riscv/riscv-64-sha512.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <wolfssl/wolfcrypt/libwolfssl_sources.h>
2323

2424
#ifdef WOLFSSL_RISCV_ASM
25-
#if !defined(NO_SHA512) || defined(WOLFSSL_SHA384)
25+
#if defined(WOLFSSL_SHA512) || defined(WOLFSSL_SHA384)
2626

2727
#if FIPS_VERSION3_LT(6,0,0) && defined(HAVE_FIPS)
2828
#undef HAVE_FIPS
@@ -984,7 +984,7 @@ static WC_INLINE void Sha512Final(wc_Sha512* sha512, byte* hash, int hashLen)
984984
}
985985

986986

987-
#ifndef NO_SHA512
987+
#ifdef WOLFSSL_SHA512
988988

989989
/* Initialize SHA-512 object for hashing.
990990
*
@@ -1494,7 +1494,7 @@ int wc_Sha512_256Transform(wc_Sha512* sha512, const unsigned char* data)
14941494

14951495
#endif /* !HAVE_FIPS && !HAVE_SELFTEST */
14961496

1497-
#endif /* !NO_SHA512 */
1497+
#endif /* WOLFSSL_SHA512 */
14981498

14991499

15001500
#ifdef WOLFSSL_SHA384
@@ -1737,5 +1737,5 @@ int wc_Sha384Copy(wc_Sha384* src, wc_Sha384* dst)
17371737

17381738
#endif /* WOLFSSL_SHA384 */
17391739

1740-
#endif /* !NO_SHA512 || WOLFSSL_SHA384 */
1740+
#endif /* WOLFSSL_SHA512 || WOLFSSL_SHA384 */
17411741
#endif /* WOLFSSL_RISCV_ASM */

0 commit comments

Comments
 (0)