Commit 9c754fc
committed
async: harden crypto callback poll re-entry
Address review feedback:
- wc_CryptoCb_Poll() now hard-fails (WC_HW_E) when the device is missing
or unregistered, instead of returning WC_NO_PENDING_E and letting the
async layer treat an in-flight op as done with an unfilled buffer.
- Poll the callback only while the event is still WC_PENDING_E, so a
completed result is not overwritten on a later poll pass.
- Include WOLFSSL_ASYNC_CRYPT in the poll guards to match the
wc_CryptoCb_Poll() declaration.1 parent 37c2652 commit 9c754fc
2 files changed
Lines changed: 22 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
598 | 599 | | |
599 | 600 | | |
600 | 601 | | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
605 | 609 | | |
606 | 610 | | |
607 | 611 | | |
| |||
763 | 767 | | |
764 | 768 | | |
765 | 769 | | |
766 | | - | |
| 770 | + | |
| 771 | + | |
767 | 772 | | |
768 | 773 | | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
773 | 781 | | |
774 | 782 | | |
775 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
468 | 471 | | |
469 | 472 | | |
470 | 473 | | |
| |||
0 commit comments