Fix redefinition of AEAD asserts in e_aes.c.
Following https://boringssl-review.googlesource.com/c/32506. Many parts of android don't have c11 support, and so they complain when these asserts implicitly redefine, e.g. AEAD_state_too_small. Failure reference: https://android-build.googleplex.com/builds/pending/P6876320/aosp_cf_x86_phone-userdebug/latest/view/logs/build_error.log Change-Id: Icbdd9aec6bf3b3d87e15d7f4f37505a1639b59c0 Reviewed-on: https://boringssl-review.googlesource.com/c/32684 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
b64c53fcfd
commit
127a1ec080
@ -40,10 +40,10 @@ struct aead_aes_gcm_siv_asm_ctx {
|
|||||||
// aligns to 16 bytes itself.
|
// aligns to 16 bytes itself.
|
||||||
OPENSSL_COMPILE_ASSERT(sizeof(((EVP_AEAD_CTX *)NULL)->state) + 8 >=
|
OPENSSL_COMPILE_ASSERT(sizeof(((EVP_AEAD_CTX *)NULL)->state) + 8 >=
|
||||||
sizeof(struct aead_aes_gcm_siv_asm_ctx),
|
sizeof(struct aead_aes_gcm_siv_asm_ctx),
|
||||||
AEAD_state_too_small);
|
AEAD_state_too_small_opt);
|
||||||
#if defined(__GNUC__) || defined(__clang__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
OPENSSL_COMPILE_ASSERT(alignof(union evp_aead_ctx_st_state) >= 8,
|
OPENSSL_COMPILE_ASSERT(alignof(union evp_aead_ctx_st_state) >= 8,
|
||||||
AEAD_state_insufficient_alignment);
|
AEAD_state_insufficient_alignment_opt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// asm_ctx_from_ctx returns a 16-byte aligned context pointer from |ctx|.
|
// asm_ctx_from_ctx returns a 16-byte aligned context pointer from |ctx|.
|
||||||
|
@ -1081,11 +1081,11 @@ struct aead_aes_gcm_tls12_ctx {
|
|||||||
|
|
||||||
OPENSSL_COMPILE_ASSERT(sizeof(((EVP_AEAD_CTX *)NULL)->state) >=
|
OPENSSL_COMPILE_ASSERT(sizeof(((EVP_AEAD_CTX *)NULL)->state) >=
|
||||||
sizeof(struct aead_aes_gcm_tls12_ctx),
|
sizeof(struct aead_aes_gcm_tls12_ctx),
|
||||||
AEAD_state_too_small);
|
AEAD_state_too_small_tls12);
|
||||||
#if defined(__GNUC__) || defined(__clang__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
OPENSSL_COMPILE_ASSERT(alignof(union evp_aead_ctx_st_state) >=
|
OPENSSL_COMPILE_ASSERT(alignof(union evp_aead_ctx_st_state) >=
|
||||||
alignof(struct aead_aes_gcm_tls12_ctx),
|
alignof(struct aead_aes_gcm_tls12_ctx),
|
||||||
AEAD_state_insufficient_alignment);
|
AEAD_state_insufficient_alignment_tls12);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int aead_aes_gcm_tls12_init(EVP_AEAD_CTX *ctx, const uint8_t *key,
|
static int aead_aes_gcm_tls12_init(EVP_AEAD_CTX *ctx, const uint8_t *key,
|
||||||
@ -1175,11 +1175,11 @@ struct aead_aes_gcm_tls13_ctx {
|
|||||||
|
|
||||||
OPENSSL_COMPILE_ASSERT(sizeof(((EVP_AEAD_CTX *)NULL)->state) >=
|
OPENSSL_COMPILE_ASSERT(sizeof(((EVP_AEAD_CTX *)NULL)->state) >=
|
||||||
sizeof(struct aead_aes_gcm_tls13_ctx),
|
sizeof(struct aead_aes_gcm_tls13_ctx),
|
||||||
AEAD_state_too_small);
|
AEAD_state_too_small_tls13);
|
||||||
#if defined(__GNUC__) || defined(__clang__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
OPENSSL_COMPILE_ASSERT(alignof(union evp_aead_ctx_st_state) >=
|
OPENSSL_COMPILE_ASSERT(alignof(union evp_aead_ctx_st_state) >=
|
||||||
alignof(struct aead_aes_gcm_tls13_ctx),
|
alignof(struct aead_aes_gcm_tls13_ctx),
|
||||||
AEAD_state_insufficient_alignment);
|
AEAD_state_insufficient_alignment_tls13);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int aead_aes_gcm_tls13_init(EVP_AEAD_CTX *ctx, const uint8_t *key,
|
static int aead_aes_gcm_tls13_init(EVP_AEAD_CTX *ctx, const uint8_t *key,
|
||||||
|
Loading…
Reference in New Issue
Block a user