You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Issues:
Addresses: P372521248
### Description of changes:
This PR adds support for building and testing AWS-LC with WebAssembly
(WASM) using an Emscripten toolchain.
### Description
- Defines `OPENSSL_WASM` when compiling with `__wasm__` to enable
WASM-specific code paths
- Configures WASM builds to use `getentropy()` for random number
generation, which Emscripten provides
- Provide CMake toolchain file: `util/wasm-toolchain.cmake`
- Added `tests/ci/run_emscripten_tests.sh` for testing.
- Added CI workflow: .github/workflows/emscripten.yml
### Call-outs:
- Threading is enabled via Emscripten's pthread implementation using Web
Workers and SharedArrayBuffer
- Tests that require `fork()` or POSIX sockets are excluded as these are
not supported in the WASM/Emscripten environments
### Testing:
- The new CI workflow builds AWS-LC and runs `crypto_test`,
`urandom_test`, and `ssl_test` in a WASM/Node.js environment
- All tests pass except those explicitly filtered out due to WASM
platform limitations (fork/socket operations)
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
@@ -100,21 +100,33 @@ A more complete description of our test setup can be found in the
100
100
101
101
### Other platforms
102
102
103
-
The platforms listed below are of interest to us or to our community. However, problems reported
104
-
against them might not be prioritized for immediate action by our team. We welcome contributions
103
+
The platforms listed below are of interest to us or to our community. However, problems reported
104
+
against them might not be prioritized for immediate action by our team. We welcome contributions
105
105
that improve the experience for consumers on these platforms.
106
106
107
-
| OS | CPU |
108
-
|-----------|-------------|
109
-
| Android | arm32 |
110
-
| iOS | aarch64 |
111
-
| Linux | arm32 |
112
-
| Linux | loongarch64 |
113
-
| Linux | risc-v64 |
114
-
| Linux | s390x |
115
-
| Windows | aarch64 |
116
-
| OpenBSD | x86-64 |
117
-
| FreeBSD | x86-64 |
107
+
| OS | CPU |
108
+
|------------|-------------|
109
+
| Android | arm32 |
110
+
| Emscripten | wasm32 |
111
+
| iOS | aarch64 |
112
+
| Linux | arm32 |
113
+
| Linux | loongarch64 |
114
+
| Linux | risc-v64 |
115
+
| Linux | s390x |
116
+
| Windows | aarch64 |
117
+
| OpenBSD | x86-64 |
118
+
| FreeBSD | x86-64 |
119
+
120
+
### WebAssembly (WASM) Support
121
+
122
+
AWS-LC can be built for WebAssembly using Emscripten. This support is experimental and has important security considerations:
123
+
124
+
-**No FIPS mode**: WASM builds cannot be FIPS-validated
125
+
-**Randomness**: Relies on the runtime's `getentropy()` implementation
126
+
-**No side-channel protections**: Timing and cache-based side-channel mitigations that exist for native builds may not apply in the WASM environment
127
+
-**Threading limitations**: Uses Web Workers which have different security properties than native threads
128
+
129
+
For build instructions, see [BUILDING.md](./BUILDING.md).
118
130
119
131
### FIPS Compliance
120
132
@@ -193,5 +205,3 @@ Security via our
193
205
Please do **not** create a public GitHub issue.
194
206
195
207
If you package or distribute AWS-LC, or use AWS-LC as part of a large multi-user service, you may be eligible for pre-notification of future AWS-LC releases. Please contact aws-lc-pre-notifications@amazon.com.
0 commit comments