Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@
now list `WOLFSSL_CRYPTOCELL` alongside the other ports that replace the
software curve arithmetic.

* **Fix (`XASM_VOLATILE()` on IAR and Keil AC5)**: `WOLF_C99` follows
`__STDC_VERSION__`, so it is defined on IAR by default (unless built with
`--c89` or `NO_WOLF_C99`), and its arm was checked first. That handed IAR,
and Keil's AC5 armcc under `__KEIL__`, `__asm__`, which neither accepts.
Both now get `__asm`, which IAR keeps under `--strict` and both Keil
compilers accept.

## Fixes

* ML-KEM and ML-DSA now keep the key's device id on their internal SHAKE hashing, so a registered crypto callback sees the SHAKE-256 Update and Final calls. by @Frauschi (PR 11544)
Expand Down
12 changes: 7 additions & 5 deletions wolfssl/wolfcrypt/wc_port.h
Original file line number Diff line number Diff line change
Expand Up @@ -2090,13 +2090,15 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
#endif
#endif

#ifdef WOLF_C99
/* Checked before WOLF_C99, which follows __STDC_VERSION__ and so is set on
* IAR by default: IAR and Keil's AC5 armcc reject __asm__. __asm works on
* IAR, including under --strict where plain asm does not, and on AC5 and
* AC6 alike. */
#if defined(__IAR_SYSTEMS_ICC__) || defined(__KEIL__)
#define XASM_VOLATILE(a) __asm volatile(a)
#elif defined(WOLF_C99)
/* use alternate keyword for compatibility with -std=c99 */
#define XASM_VOLATILE(a) __asm__ volatile(a)
#elif defined(__IAR_SYSTEMS_ICC__)
#define XASM_VOLATILE(a) asm volatile(a)
#elif defined(__KEIL__)
#define XASM_VOLATILE(a) __asm volatile(a)
#else
#define XASM_VOLATILE(a) __asm__ __volatile__(a)
#endif
Expand Down
Loading