mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-25 06:39:04 +08:00
Fix "unterminated '#pragma clang attribute push'" in sha256/sha512.c
If we're built with MBEDTLS_SHAxxx_USE_A64_CRYPTO_IF_PRESENT but don't have a way to detect the crypto extensions required, the code turns off _IF_PRESENT and falls back to C only (with a warning). This was done after the attributes are pushed, and the pop is done only #if defined(xxx_IF_PRESENT), so this commit fixes that. Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
parent
e5e8ba654e
commit
ef2aa0ecad
@ -0,0 +1,4 @@
|
|||||||
|
Bugfix
|
||||||
|
* Fix "unterminated '#pragma clang attribute push'" in sha256/sha512.c when
|
||||||
|
built with MBEDTLS_SHAxxx_USE_A64_CRYPTO_IF_PRESENT but don't have a
|
||||||
|
way to detect the crypto extensions required. A warning is still issued.
|
@ -399,6 +399,8 @@ int mbedtls_internal_sha256_process_a64_crypto(mbedtls_sha256_context *ctx,
|
|||||||
SHA256_BLOCK_SIZE) ? 0 : -1;
|
SHA256_BLOCK_SIZE) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT || MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY */
|
||||||
|
|
||||||
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
|
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#pragma clang attribute pop
|
#pragma clang attribute pop
|
||||||
@ -408,8 +410,6 @@ int mbedtls_internal_sha256_process_a64_crypto(mbedtls_sha256_context *ctx,
|
|||||||
#undef MBEDTLS_POP_TARGET_PRAGMA
|
#undef MBEDTLS_POP_TARGET_PRAGMA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT || MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY */
|
|
||||||
|
|
||||||
#if !defined(MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT)
|
#if !defined(MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT)
|
||||||
#define mbedtls_internal_sha256_process_many_c mbedtls_internal_sha256_process_many
|
#define mbedtls_internal_sha256_process_many_c mbedtls_internal_sha256_process_many
|
||||||
#define mbedtls_internal_sha256_process_c mbedtls_internal_sha256_process
|
#define mbedtls_internal_sha256_process_c mbedtls_internal_sha256_process
|
||||||
|
@ -569,6 +569,8 @@ int mbedtls_internal_sha512_process_a64_crypto(mbedtls_sha512_context *ctx,
|
|||||||
SHA512_BLOCK_SIZE) ? 0 : -1;
|
SHA512_BLOCK_SIZE) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY */
|
||||||
|
|
||||||
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
|
#if defined(MBEDTLS_POP_TARGET_PRAGMA)
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#pragma clang attribute pop
|
#pragma clang attribute pop
|
||||||
@ -578,8 +580,6 @@ int mbedtls_internal_sha512_process_a64_crypto(mbedtls_sha512_context *ctx,
|
|||||||
#undef MBEDTLS_POP_TARGET_PRAGMA
|
#undef MBEDTLS_POP_TARGET_PRAGMA
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT || MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY */
|
|
||||||
|
|
||||||
|
|
||||||
#if !defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
|
#if !defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
|
||||||
#define mbedtls_internal_sha512_process_many_c mbedtls_internal_sha512_process_many
|
#define mbedtls_internal_sha512_process_many_c mbedtls_internal_sha512_process_many
|
||||||
|
Loading…
x
Reference in New Issue
Block a user