Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm][tests] Use a polyfill for WebCrypto API support #42730

Closed
kjpou1 opened this issue Sep 25, 2020 · 1 comment
Closed

[wasm][tests] Use a polyfill for WebCrypto API support #42730

kjpou1 opened this issue Sep 25, 2020 · 1 comment
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Security untriaged New issue has not been triaged by the area owner

Comments

@kjpou1
Copy link
Contributor

kjpou1 commented Sep 25, 2020

Right now the System.Security.Cryptography tests uses a generic getRandomValues.

Microsoft provides a Web Cryptography polyfill API that can be used to provide the interface for testing within the CI.

Without a getRandomValues implementation the following is thrown in the CI.

ABORT: no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };

@kjpou1 kjpou1 added the arch-wasm WebAssembly architecture label Sep 25, 2020
@kjpou1 kjpou1 self-assigned this Sep 25, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Security untriaged New issue has not been triaged by the area owner labels Sep 25, 2020
@ghost
Copy link

ghost commented Sep 25, 2020

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @jeffhandley
See info in area-owners.md if you want to be subscribed.

@lewing lewing closed this as completed Sep 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Security untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants