mirror of
https://github.com/espressif/openthread.git
synced 2026-09-19 15:40:07 +00:00
Reject a null `aHeader` combined with non-zero `mHeaderLength` in `otPlatCryptoAesCcmProcessOneShot()`, in both the mbedtls and PSA backends. Add `otPlatCryptoIsKeyRefValid()` so each crypto backend can define what KeyRef values it accepts, and use it in the default PSA backend at every entry point that takes a KeyRef (import/export/destroy/ has-key, AES, HMAC, HKDF, ECDSA) instead of relying solely on the underlying PSA library to reject a bad handle. Make the "invalid KeyRef" sentinel backend-configurable via the new `OPENTHREAD_CONFIG_CRYPTO_INVALID_KEY_REF`, defaulting to `PSA_KEY_ID_NULL` (0), so a backend other than the default PSA one can reserve a different value as invalid without a generic core header depending on any one backend's implementation file.
OpenThread Simulation on POSIX
This directory contains example platform drivers for simulation on POSIX.
Build Examples
$ cd <path-to-openthread>
$ mkdir build && cd build
$ cmake -GNinja -DOT_PLATFORM=simulation ..
$ ninja
After a successful build, the elf files are found in:
<path-to-openthread>/build/examples/apps/cli<path-to-openthread>/build/examples/apps/ncp
Interact
- Spawn the process:
$ cd <path-to-openthread>/build/simulation/examples/apps/cli
$ ./ot-cli-ftd 1
- Type
helpfor list of commands.
> help
help
channel
childtimeout
contextreusedelay
extaddr
extpanid
ipaddr
keysequence
leaderweight
mode
netdata register
networkidtimeout
networkkey
networkname
panid
ping
prefix
releaserouterid
rloc16
route
routerupgradethreshold
scan
start
state
stop