6
0
forked from pool/boringssl
Files
boringssl/0002-crypto-Fix-aead_test-build-on-aarch64.patch

50 lines
2.1 KiB
Diff
Raw Permalink Normal View History

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
---
Accepting request 809901 from home:mrostecki:branches:security:tls - Remove patch for enabling shared linking - it was enabled upstream. * 0001-add-soversion-option.patch - Add boringssl-source subpackage. - Update to version 20200122: * Define EVP compatibility constants for X448 and Ed448. * Allow shared libraries in the external CMake build. * Add a few little-endian functions to CBS/CBB. * Move iOS asm tricks up in external CMake build. * Try again to deal with expensive tests. * Restore ARM CPU variation tests on builders. * Remove SSL_CTX_set_rsa_pss_rsae_certs_enabled. * Work around another NULL/0 C language bug. * Use the MAYBE/DISABLED pattern in RSATest.BlindingCacheConcurrency. * Switch an #if-0-gated test to DISABLED_Foo. * Proxy: send whole SSL records through the handshaker. * Disable Wycheproof primality test cases on non-x86 (too slow) * test_state.cc: serialize the test clock. * Output after every Wycheproof primality test. * Maybe fix generated-CMake build on Android and iOS. * Detect the NDK path from CMAKE_TOOLCHAIN_FILE. * Tell Go to build for GOOS=android when running on Android. * Reland bitsliced aes_nohw implementation. * Add bssl client option to load a hashed directory of cacerts. * No-op change to run the new NO_SSE2 builders. * Clarify that we perform the point-on-curve check. * Reduce size of BlindingCacheConcurrency test under TSAN. * Compare vpaes/bsaes conversions against a reference implementation. * Enable the SSE2 Poly1305 implementation on clang-cl. OBS-URL: https://build.opensuse.org/request/show/809901 OBS-URL: https://build.opensuse.org/package/show/security:tls/boringssl?expand=0&rev=30
2020-05-28 10:24:38 +00:00
src/crypto/cipher_extra/aead_test.cc | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
Index: boringssl-20200122/src/crypto/cipher_extra/aead_test.cc
===================================================================
--- 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"
+#if defined(OPENSSL_AARCH64)
+#define ALIGN_BYTES 16
+#else
+#define ALIGN_BYTES 64
+#endif
+
struct KnownAEAD {
const char name[40];