Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1863d35
[WIP] - Start crypto worker and initialize channel.
AaronRobinsonMSFT Mar 10, 2021
d5c4199
Make Emscripten minimizer happy by using getters instead of fields.
AaronRobinsonMSFT Mar 10, 2021
4e2d738
Add new System.Security.Cryptography.Native.Browser library.
AaronRobinsonMSFT Mar 11, 2021
5ec3db7
Initialize WebWorker earlier.
AaronRobinsonMSFT Mar 11, 2021
c7e3888
Update logging and be less strict for output buffer size.
AaronRobinsonMSFT Mar 11, 2021
47b5e6c
Focus SHA tests for non-browser and browser DOM scenarios.
AaronRobinsonMSFT Mar 11, 2021
891b23c
Merge remote-tracking branch 'upstream/main' into wasm_crypto
AaronRobinsonMSFT Mar 11, 2021
d4ea7d6
Add missing namespaces to test builds.
AaronRobinsonMSFT Mar 12, 2021
8062a2f
Additional locations for that need the crypto_worker.js file.
AaronRobinsonMSFT Mar 12, 2021
2b38fdd
Add new JS and native binaries... everywhere.
AaronRobinsonMSFT Mar 12, 2021
84dd60b
Reference the correct location for the webworker file.
AaronRobinsonMSFT Mar 13, 2021
36b2f56
Specify the correct native directory path for the JS WebWorker file.
AaronRobinsonMSFT Mar 13, 2021
80087a5
Only enable Crypto WebWorker when running in the browser scenario.
AaronRobinsonMSFT Mar 15, 2021
6a3b8a6
Condition more tests based on platform Crypto support needed.
AaronRobinsonMSFT Mar 15, 2021
d78f0e2
Rename crypto_worker.js to dotnet_crypto_worker.js
AaronRobinsonMSFT Mar 15, 2021
2e74b1f
Missing installer directory.
AaronRobinsonMSFT Mar 15, 2021
7eb087d
Style
AaronRobinsonMSFT Mar 16, 2021
b04d0cc
Merge remote-tracking branch 'upstream/main' into wasm_crypto
AaronRobinsonMSFT Mar 16, 2021
925dcc0
Change internal API name to use generic "digest" name instead
AaronRobinsonMSFT Mar 16, 2021
753c57b
Add test for not supported platform crypto WRT SHA
AaronRobinsonMSFT Mar 17, 2021
74a4e7e
Merge remote-tracking branch 'upstream/main' into wasm_crypto
AaronRobinsonMSFT Mar 17, 2021
b217fc4
Browser uses Unix binary builds so removing Windows placeholder.
AaronRobinsonMSFT Mar 17, 2021
a95e9d6
Add libSystem.Security.Cryptography.Native.Browser.a for Windows build.
AaronRobinsonMSFT Mar 18, 2021
ce6d2b1
More Windows build changes.
AaronRobinsonMSFT Mar 18, 2021
42eac88
Merge remote-tracking branch 'upstream/main' into wasm_crypto
AaronRobinsonMSFT Mar 23, 2021
55dfe74
Merge remote-tracking branch 'upstream/main' into wasm_crypto
AaronRobinsonMSFT Mar 24, 2021
f777cb3
Merge remote-tracking branch 'upstream/main' into wasm_crypto
AaronRobinsonMSFT Mar 25, 2021
c13a76e
Merge remote-tracking branch 'upstream/main' into wasm_crypto
AaronRobinsonMSFT Mar 25, 2021
f2e28fc
Merge remote-tracking branch 'upstream/main' into wasm_crypto
AaronRobinsonMSFT Mar 25, 2021
c749ab5
Merge remote-tracking branch 'upstream/main' into wasm_crypto
AaronRobinsonMSFT Mar 29, 2021
4c5a3e0
Merge remote-tracking branch 'upstream/main' into wasm_crypto
lewing Apr 22, 2021
44ea919
Merge branch 'main' into wasm_crypto
lewing Apr 22, 2021
742cbc3
Fix the js inclusion logic
lewing Apr 22, 2021
76dd72b
Add libSystem.Globalization.Native explicitly
lewing Apr 23, 2021
bc7ec42
Merge branch 'main' into wasm_crypto
jeffhandley May 11, 2021
3eb7b2f
Merge branch 'main' into wasm_crypto
jeffhandley May 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename crypto_worker.js to dotnet_crypto_worker.js
  • Loading branch information
AaronRobinsonMSFT committed Mar 15, 2021
commit d78f0e235bc13d7f37b8cbfb400f3936156826d2
2 changes: 1 addition & 1 deletion eng/SignCheckExclusionsFile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
*comhosttemplatecomhostdll.dll;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
*staticapphosttemplateapphostexe.exe;;Template, DO-NOT-SIGN, https://github.com/dotnet/core-setup/pull/7549
*dotnet.js;;Workaround, https://github.com/dotnet/core-eng/issues/9933
*crypto_worker.js;;Workaround, https://github.com/dotnet/core-eng/issues/9933
*dotnet_crypto_worker.js;;Workaround, https://github.com/dotnet/core-eng/issues/9933
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ViktorHofer just curious, what is the purpose of this file? From the linked issue, it seems that signing validation happens in an outer ring - in which case what is the purpose of these exclusions. Just curious

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That file predates the outer ring signing validation. @mmitche do you know if the Validate-DotNet outer ring validation honors the SignCheckExclusionFile in our repo?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also just saw that the outer ring signing validation is failing and opened https://github.com/dotnet/core-eng/issues/12601 to better understand who tracks that pipeline.

2 changes: 1 addition & 1 deletion eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
$(LibrariesNativeArtifactsPath)dotnet.js;
$(LibrariesNativeArtifactsPath)dotnet.wasm;
$(LibrariesNativeArtifactsPath)dotnet.timezones.blat;
$(LibrariesNativeArtifactsPath)crypto_worker.js;
$(LibrariesNativeArtifactsPath)dotnet_crypto_worker.js;
$(LibrariesNativeArtifactsPath)*.dat;"
IsNative="true" />
<LibrariesRuntimeFiles Condition="'$(TargetOS)' == 'Browser'"
Expand Down
6 changes: 3 additions & 3 deletions src/mono/wasm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@ $(BUILDS_OBJ_DIR)/pinvoke.o: runtime/pinvoke.c runtime/pinvoke.h $(BUILDS_OBJ_DI
$(BUILDS_OBJ_DIR)/corebindings.o: runtime/corebindings.c | $(BUILDS_OBJ_DIR)
$(EMCC) $(EMCC_FLAGS) $(1) -Oz -I$(MONO_INCLUDE_DIR) runtime/corebindings.c -c -o $$@

$(NATIVE_BIN_DIR)/crypto_worker.js: runtime/crypto_worker.js | $(NATIVE_BIN_DIR)
cp runtime/crypto_worker.js $(NATIVE_BIN_DIR)/crypto_worker.js
$(NATIVE_BIN_DIR)/dotnet_crypto_worker.js: runtime/dotnet_crypto_worker.js | $(NATIVE_BIN_DIR)
cp runtime/dotnet_crypto_worker.js $(NATIVE_BIN_DIR)/dotnet_crypto_worker.js

$(NATIVE_BIN_DIR)/src/emcc-flags.txt: | $(NATIVE_BIN_DIR)/src Makefile
echo "$(call escape_quote,$(EMCC_FLAGS)) $(1) -Oz" > $$@

$(NATIVE_BIN_DIR)/src/emcc-version.txt: $(EMSDK_PATH)/upstream/.emsdk_version | $(NATIVE_BIN_DIR)/src
$(EMCC) --version | head -1 > $$@

build-native: $(NATIVE_BIN_DIR)/dotnet.js $(NATIVE_BIN_DIR)/crypto_worker.js $(NATIVE_BIN_DIR)/src/emcc-flags.txt $(NATIVE_BIN_DIR)/src/emcc-version.txt
build-native: $(NATIVE_BIN_DIR)/dotnet.js $(NATIVE_BIN_DIR)/dotnet_crypto_worker.js $(NATIVE_BIN_DIR)/src/emcc-flags.txt $(NATIVE_BIN_DIR)/src/emcc-version.txt

endef

Expand Down
6 changes: 3 additions & 3 deletions src/mono/wasm/build/WasmApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@

<_HasDotnetWasm Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.wasm'">true</_HasDotnetWasm>
<_HasDotnetJs Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet.js'">true</_HasDotnetJs>
<_HasCryptoWorkerJs Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'crypto_worker.js'">true</_HasCryptoWorkerJs>
<_HasCryptoWorkerJs Condition="'%(WasmNativeAsset.FileName)%(WasmNativeAsset.Extension)' == 'dotnet_crypto_worker.js'">true</_HasCryptoWorkerJs>
</PropertyGroup>

<ItemGroup>
<!-- If dotnet.{wasm,js} weren't added already (eg. AOT can add them), then add the default ones -->
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.wasm" Condition="'$(_HasDotnetWasm)' != 'true'" />
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.js" Condition="'$(_HasDotnetJs)' != 'true'" />
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)crypto_worker.js" Condition="'$(_HasCryptoWorkerJs)' != 'true'" />
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet_crypto_worker.js" Condition="'$(_HasCryptoWorkerJs)' != 'true'" />

<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)$(WasmIcuDataFileName)" Condition="'$(InvariantGlobalization)' != 'true'" />
<WasmNativeAsset Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)dotnet.timezones.blat" />
Expand Down Expand Up @@ -348,7 +348,7 @@
<ItemGroup>
<WasmNativeAsset Include="$(_WasmIntermediateOutputPath)dotnet.wasm" />
<WasmNativeAsset Include="$(_WasmIntermediateOutputPath)dotnet.js" />
<WasmNativeAsset Include="$(_WasmWebWorkerDir)crypto_worker.js" />
<WasmNativeAsset Include="$(_WasmWebWorkerDir)dotnet_crypto_worker.js" />
</ItemGroup>
</Target>

Expand Down
2 changes: 1 addition & 1 deletion src/mono/wasm/runtime/library_mono.js
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ var MonoSupportLib = {
// Crypto support is only available in the Browser.
if (ENVIRONMENT_IS_WEB) {
var chan = Module.channel.create();
var worker = new Worker ("crypto_worker.js");
var worker = new Worker ("dotnet_crypto_worker.js");
worker.postMessage ({
comm_buf: chan.get_comm_buffer(),
msg_buf: chan.get_msg_buffer(),
Expand Down
2 changes: 1 addition & 1 deletion src/mono/wasm/wasm.proj
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<Copy SourceFiles="$(NativeBinDir)dotnet.js;
$(NativeBinDir)dotnet.wasm;
$(NativeBinDir)dotnet.timezones.blat;
$(NativeBinDir)crypto_worker.js;
$(NativeBinDir)dotnet_crypto_worker.js;
$(NativeBinDir)libicuuc.a;
$(NativeBinDir)libicui18n.a"
DestinationFolder="$(MicrosoftNetCoreAppRuntimePackNativeDir)"
Expand Down