Commit 2a18b7e
Fix non-blocking X25519/ECC with WOLFSSL_ASYNC_CRYPT_SW
The non-blocking setup for X25519 and ECC in TLS was unconditionally
setting up nbCtx, which caused functions to return FP_WOULDBLOCK. However,
with INVALID_DEVID (the default), TLS has no async loop to handle
FP_WOULDBLOCK, only WC_PENDING_E via the async framework.
The fix follows the pattern used in asn.c: only set up nbCtx when the async
device is active (devId != INVALID_DEVID). With INVALID_DEVID, the code now
uses the blocking fallback (WC_ECC_NONBLOCK_ONLY) instead.
This prevents unit test timeouts when built with --enable-curve25519=nonblock
or --enable-ecc=nonblock.
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent 19bb719 commit 2a18b7e
2 files changed
+23
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8338 | 8338 | | |
8339 | 8339 | | |
8340 | 8340 | | |
8341 | | - | |
| 8341 | + | |
| 8342 | + | |
| 8343 | + | |
| 8344 | + | |
8342 | 8345 | | |
8343 | 8346 | | |
8344 | 8347 | | |
| |||
8365 | 8368 | | |
8366 | 8369 | | |
8367 | 8370 | | |
8368 | | - | |
8369 | | - | |
| 8371 | + | |
| 8372 | + | |
| 8373 | + | |
| 8374 | + | |
| 8375 | + | |
| 8376 | + | |
8370 | 8377 | | |
8371 | 8378 | | |
8372 | 8379 | | |
| |||
8379 | 8386 | | |
8380 | 8387 | | |
8381 | 8388 | | |
8382 | | - | |
| 8389 | + | |
| 8390 | + | |
8383 | 8391 | | |
8384 | 8392 | | |
8385 | 8393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8008 | 8008 | | |
8009 | 8009 | | |
8010 | 8010 | | |
8011 | | - | |
8012 | | - | |
| 8011 | + | |
| 8012 | + | |
| 8013 | + | |
| 8014 | + | |
| 8015 | + | |
| 8016 | + | |
8013 | 8017 | | |
8014 | 8018 | | |
8015 | 8019 | | |
| |||
8018 | 8022 | | |
8019 | 8023 | | |
8020 | 8024 | | |
| 8025 | + | |
| 8026 | + | |
| 8027 | + | |
8021 | 8028 | | |
8022 | 8029 | | |
8023 | | - | |
| 8030 | + | |
| 8031 | + | |
8024 | 8032 | | |
8025 | 8033 | | |
8026 | 8034 | | |
| |||
0 commit comments