aes_v8_xts_encrypt is present only on 64bit arm builds
authorTomas Mraz <tomas@openssl.org>
Tue, 10 Aug 2021 07:00:22 +0000 (09:00 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 11 Aug 2021 08:08:57 +0000 (10:08 +0200)
Fixes #16273

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16275)

include/crypto/aes_platform.h

index f1b1d62549e9fb00a6f5cae7f6f3ef3d022523bc..015c3bd4ab9176fa0ec55c56fdcf9124f0d1248c 100644 (file)
@@ -92,7 +92,7 @@ void AES_xts_decrypt(const unsigned char *inp, unsigned char *out, size_t len,
 #    define HWAES_decrypt aes_v8_decrypt
 #    define HWAES_cbc_encrypt aes_v8_cbc_encrypt
 #    define HWAES_ecb_encrypt aes_v8_ecb_encrypt
 #    define HWAES_decrypt aes_v8_decrypt
 #    define HWAES_cbc_encrypt aes_v8_cbc_encrypt
 #    define HWAES_ecb_encrypt aes_v8_ecb_encrypt
-#    if __ARM_MAX_ARCH__>=8
+#    if __ARM_MAX_ARCH__>=8 && defined(__aarch64__)
 #     define HWAES_xts_encrypt aes_v8_xts_encrypt
 #     define HWAES_xts_decrypt aes_v8_xts_decrypt
 #    endif
 #     define HWAES_xts_encrypt aes_v8_xts_encrypt
 #     define HWAES_xts_decrypt aes_v8_xts_decrypt
 #    endif