From b40f734bc380f5a3eb9cc5de1dd48d73c29e7513 Mon Sep 17 00:00:00 2001 From: slontis Date: Mon, 31 Mar 2025 09:42:59 +1100 Subject: [PATCH] Fix Strict c issue in aes_gcm for armv8 Reported by David Makepeace Reviewed-by: Paul Dale Reviewed-by: Kurt Roeckx Reviewed-by: Tom Cosgrove Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27203) (cherry picked from commit 0a78595eac55cc9ec9d2046c704404ec52752b8c) --- .../implementations/ciphers/cipher_aes_gcm_hw_armv8.inc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc index cc240715003..b5dba478a15 100644 --- a/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc +++ b/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc @@ -15,10 +15,8 @@ size_t armv8_aes_gcm_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], u64 *Xi) { - size_t align_bytes = 0; - align_bytes = len - len % 16; - AES_KEY *aes_key = (AES_KEY *)key; + size_t align_bytes = len - len % 16; switch(aes_key->rounds) { case 10: @@ -49,10 +47,8 @@ size_t armv8_aes_gcm_encrypt(const unsigned char *in, unsigned char *out, size_t size_t armv8_aes_gcm_decrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key, unsigned char ivec[16], u64 *Xi) { - size_t align_bytes = 0; - align_bytes = len - len % 16; - AES_KEY *aes_key = (AES_KEY *)key; + size_t align_bytes = len - len % 16; switch(aes_key->rounds) { case 10: -- 2.47.2