2019-04-25 16:10:16 +00:00
|
|
|
From d16b362b228ebee5c16ae6c214a50348e9e963b9 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Michal Rostecki <mrostecki@opensuse.org>
|
|
|
|
Date: Thu, 25 Apr 2019 16:11:28 +0200
|
|
|
|
Subject: [PATCH] crypto: Fix aead_test build on aarch64
|
|
|
|
|
|
|
|
aarch64 does not allow allignments larger than 16 bytes.
|
|
|
|
|
|
|
|
Before this change, `aead_test.cc` build on aarch64 was failing with the
|
|
|
|
following errors:
|
|
|
|
|
|
|
|
aead_test.cc:543:54: error: requested alignment 64 is larger than 16 [-Werror=attributes]
|
|
|
|
alignas(64) uint8_t key[EVP_AEAD_MAX_KEY_LENGTH + 1];
|
|
|
|
aead_test.cc:544:58: error: requested alignment 64 is larger than 16 [-Werror=attributes]
|
|
|
|
alignas(64) uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH + 1];
|
|
|
|
aead_test.cc:545:39: error: requested alignment 64 is larger than 16 [-Werror=attributes]
|
|
|
|
alignas(64) uint8_t plaintext[32 + 1];
|
|
|
|
aead_test.cc:546:32: error: requested alignment 64 is larger than 16 [-Werror=attributes]
|
|
|
|
alignas(64) uint8_t ad[32 + 1];
|
|
|
|
aead_test.cc:564:75: error: requested alignment 64 is larger than 16 [-Werror=attributes]
|
|
|
|
alignas(64) uint8_t ciphertext[sizeof(plaintext) + EVP_AEAD_MAX_OVERHEAD];
|
|
|
|
aead_test.cc:572:45: error: requested alignment 64 is larger than 16 [-Werror=attributes]
|
|
|
|
alignas(64) uint8_t out[sizeof(ciphertext)];
|
|
|
|
aead_test.cc:586:50: error: requested alignment 64 is larger than 16 [-Werror=attributes]
|
|
|
|
alignas(64) uint8_t key[EVP_AEAD_MAX_KEY_LENGTH];
|
|
|
|
^
|
|
|
|
|
|
|
|
Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
|
|
|
|
Change-Id: Iac2c6810fa260ad214abde8db733793ac914acda
|
|
|
|
---
|
2020-05-28 10:24:38 +00:00
|
|
|
src/crypto/cipher_extra/aead_test.cc | 20 +++++++++++++-------
|
2019-04-25 16:10:16 +00:00
|
|
|
1 file changed, 13 insertions(+), 7 deletions(-)
|
|
|
|
|
2025-08-18 16:33:49 +02:00
|
|
|
Index: boringssl-20200122/src/crypto/cipher_extra/aead_test.cc
|
2019-09-03 07:30:31 +00:00
|
|
|
===================================================================
|
2025-08-18 16:33:49 +02:00
|
|
|
--- boringssl-20200122.orig/src/crypto/cipher_extra/aead_test.cc
|
|
|
|
+++ boringssl-20200122/src/crypto/cipher_extra/aead_test.cc
|
|
|
|
@@ -29,6 +29,12 @@
|
|
|
|
#include "../test/test_util.h"
|
|
|
|
#include "../test/wycheproof_util.h"
|
2019-04-25 16:10:16 +00:00
|
|
|
|
|
|
|
+#if defined(OPENSSL_AARCH64)
|
|
|
|
+#define ALIGN_BYTES 16
|
|
|
|
+#else
|
|
|
|
+#define ALIGN_BYTES 64
|
|
|
|
+#endif
|
|
|
|
+
|
2025-08-18 16:33:49 +02:00
|
|
|
|
2019-04-25 16:10:16 +00:00
|
|
|
struct KnownAEAD {
|
|
|
|
const char name[40];
|