From 554044931578f405dcfebda02ea44a85ce9cbead Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Tue, 5 Sep 2023 23:37:09 -0500 Subject: [PATCH] wolfcrypt/src/port/arm/armv8-aes.c: add missing implementations of wc_AesCtrSetKey(), and add (void)dir in implementation to silence -Wunused. --- wolfcrypt/src/port/arm/armv8-aes.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/wolfcrypt/src/port/arm/armv8-aes.c b/wolfcrypt/src/port/arm/armv8-aes.c index fe6ebff9a..544b3a619 100644 --- a/wolfcrypt/src/port/arm/armv8-aes.c +++ b/wolfcrypt/src/port/arm/armv8-aes.c @@ -1452,6 +1452,13 @@ int wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) return 0; } +int wc_AesCtrSetKey(Aes* aes, const byte* key, word32 len, + const byte* iv, int dir) +{ + (void)dir; + return wc_AesSetKey(aes, key, len, iv, AES_ENCRYPTION); +} + #endif /* WOLFSSL_AES_COUNTER */ #ifdef HAVE_AESGCM @@ -4212,6 +4219,13 @@ int wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) return 0; } +int wc_AesCtrSetKey(Aes* aes, const byte* key, word32 len, + const byte* iv, int dir) +{ + (void)dir; + return wc_AesSetKey(aes, key, len, iv, AES_ENCRYPTION); +} + #endif /* WOLFSSL_AES_COUNTER */ #ifdef HAVE_AESGCM @@ -5723,6 +5737,7 @@ int wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz) int wc_AesCtrSetKey(Aes* aes, const byte* key, word32 len, const byte* iv, int dir) { + (void)dir; return wc_AesSetKey(aes, key, len, iv, AES_ENCRYPTION); } #endif /* WOLFSSL_AES_COUNTER */