[wasm] Enable crypto and related tests
steveisok opened this issue · comments
The crypto tests are currently disabled since we are not shipping Wasm w/ openssl and interop w/ SubtleCrypto is not currently possible. Reasoning being, some of our .NET crypto API's are sync and all SubtleCrypto is async.
As of right now, something like Asyncify will not work for us either, but it's something we should continue to pay attention to.
This document should be updated when we have the solution.
https://github.com/dotnet/runtime/blob/main/docs/design/features/cross-platform-cryptography.md
@steveisok, any recent thoughts on this? Are there any chances to do it for dotnet 7?
Now that there is a build with wasm threads enabled, this should be possible. #70461 will make it easier to configure.
@lewing can you help with assigning?
@steveisok Would "wasm threads" a) mean that we could just use simple sync over async for the crypto API, not have to write our own message pump thing, and b) mean that there are now race conditions possible in the message pump and we have to harden it?
@steveisok Would "wasm threads" a) mean that we could just use simple sync over async for the crypto API, not have to write our own message pump thing, and b) mean that there are now race conditions possible in the message pump and we have to harden it?
I'm not sure. We're going to have to try and see if sync over async works with the crypto API. The behavior of wasm threads can be a little strange.
Given the plan laid out in #40074 (comment) and #73858, I think it should be closed.