Skip to content

Commit 99a7a50

Browse files
authored
Merge pull request #53 from haydenroche5/async_sw
For the software backend, convert FP_WOULDBLOCK to WC_PENDING_E.
2 parents 5526852 + 9e2ccc0 commit 99a7a50

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

wolfcrypt/src/async.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,12 @@ static int wolfAsync_DoSw(WC_ASYNC_DEV* asyncDev)
280280
};
281281

282282
/* Reset test type */
283-
sw->type = ASYNC_SW_NONE;
283+
if (ret == FP_WOULDBLOCK) {
284+
ret = WC_PENDING_E;
285+
}
286+
else if (ret == 0) {
287+
sw->type = ASYNC_SW_NONE;
288+
}
284289

285290
return ret;
286291
}

0 commit comments

Comments
 (0)