From cba69093cc82102f148c33d57549ef6914ba8eae Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Sat, 27 Jun 2026 14:41:17 -0500 Subject: [PATCH] wolfcrypt/src/port/riscv/riscv-64-aes.c: in GHASH(), remove runtime nullness check for arg 1 (matching nonnull attribute to arg 1 added to prototype in earlier commit). --- wolfcrypt/src/port/riscv/riscv-64-aes.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/wolfcrypt/src/port/riscv/riscv-64-aes.c b/wolfcrypt/src/port/riscv/riscv-64-aes.c index 2f23070ce0..4e1c14c842 100644 --- a/wolfcrypt/src/port/riscv/riscv-64-aes.c +++ b/wolfcrypt/src/port/riscv/riscv-64-aes.c @@ -4552,7 +4552,6 @@ static WC_INLINE void FlattenSzInBits(byte* buf, word32 sz) void GHASH(Gcm* gcm, const byte* a, word32 aSz, const byte* c, word32 cSz, byte* s, word32 sSz) { - if (gcm != NULL) { ALIGN8 byte x[WC_AES_BLOCK_SIZE]; ALIGN8 byte scratch[WC_AES_BLOCK_SIZE]; byte* h = gcm->H; @@ -4688,7 +4687,6 @@ void GHASH(Gcm* gcm, const byte* a, word32 aSz, const byte* c, word32 cSz, /* Copy the result into s. */ XMEMCPY(s, x, sSz); - } } #define HAVE_GHASH @@ -5295,7 +5293,6 @@ static void ghash_blocks(byte* x, byte* y, const byte* in, word32 blocks) void GHASH(Gcm* gcm, const byte* a, word32 aSz, const byte* c, word32 cSz, byte* s, word32 sSz) { - if (gcm != NULL) { ALIGN8 byte x[WC_AES_BLOCK_SIZE]; ALIGN8 byte scratch[WC_AES_BLOCK_SIZE]; word32 blocks, partial; @@ -5343,7 +5340,6 @@ void GHASH(Gcm* gcm, const byte* a, word32 aSz, const byte* c, word32 cSz, /* Copy the result into s. */ XMEMCPY(s, x, sSz); - } } #define HAVE_GHASH @@ -8720,7 +8716,6 @@ static WC_INLINE void GMULT(byte *x, byte m[32][WC_AES_BLOCK_SIZE]) void GHASH(Gcm* gcm, const byte* a, word32 aSz, const byte* c, word32 cSz, byte* s, word32 sSz) { - if (gcm != NULL) { ALIGN8 byte x[WC_AES_BLOCK_SIZE]; ALIGN8 byte scratch[WC_AES_BLOCK_SIZE]; word32 blocks, partial; @@ -8769,7 +8764,6 @@ void GHASH(Gcm* gcm, const byte* a, word32 aSz, const byte* c, word32 cSz, /* Copy the result into s. */ XMEMCPY(s, x, sSz); - } } #endif /* !HAVE_GHASH */