The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
wolfssl/wolfcrypt/sha256.h: in definition of struct wc_Sha256, conditionalize alignment optimization of digest and buffer slots on defined(WC_64BIT_CPU), to avoid overalignment warnings on 32 bit targets. this also fixes overalignment of struct Hmac.
wolfssl/wolfcrypt/sha256.h
: in definition ofstruct wc_Sha256
, conditionalize alignment optimization ofdigest
andbuffer
slots ondefined(WC_64BIT_CPU)
, to avoid overalignment warnings on 32 bit targets. this also fixes overalignment ofstruct Hmac
.see https://www.wolfssl.com/forums/topic2125-armcc-byte-alignment-cannot-be-greater-than-8-bytes-warning.html
ARMCC
reportsWith this patch, the alignment of
struct Hmac
drops from 16 to 8 on 32 bit targets.tested with
wolfssl-multi-test.sh ... sanitizer-all-intelasm-c-fallback-fuzzer cross-aarch64-all-armasm-unittest-sanitizer cross-aarch64-all-noasm-unittest-sanitizer cross-armv7a-all-armasm-testsuite-sanitizer super-quick-check