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

Mark System.Security.Cryptography.Algorithms as unsupported on Browser WASM #42010

Merged
merged 8 commits into from
Sep 11, 2020

Conversation

MaximLipnin
Copy link
Contributor

@MaximLipnin MaximLipnin commented Sep 9, 2020

There are some types from System.Security.Cryptography.Algorithms which are supported on Browser:

T:System.Security.Cryptography.RandomNumberGenerator
T:System.Security.Cryptography.IncrementalHash
T:System.Security.Cryptography.SHA1
T:System.Security.Cryptography.SHA256
T:System.Security.Cryptography.SHA384
T:System.Security.Cryptography.SHA512
T:System.Security.Cryptography.SHA1Managed
T:System.Security.Cryptography.SHA256Managed
T:System.Security.Cryptography.SHA384Managed
T:System.Security.Cryptography.SHA512Managed

Others throw PNSE and can be marked as unsupported.

Part of #41087

@ghost
Copy link

ghost commented Sep 9, 2020

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

@MaximLipnin MaximLipnin force-pushed the crypto_unsupported_on_browser branch 3 times, most recently from ac338f2 to 3723b99 Compare September 9, 2020 11:27
@vcsjones
Copy link
Member

vcsjones commented Sep 9, 2020

I think IncrementalHash.CreateHMAC could be marked as not supported since Browser doesn't support HMACs. IncrementalHash only works when used with CreateHash.

@MaximLipnin
Copy link
Contributor Author

I think IncrementalHash.CreateHMAC could be marked as not supported since Browser doesn't support HMACs. IncrementalHash only works when used with CreateHash.

@vcsjones Thanks, addressed

@vcsjones
Copy link
Member

vcsjones commented Sep 9, 2020

.. which are supported on Browser:
T:System.Security.Cryptography.MD5

My understanding is that MD5 support was removed and won't be supported in Browser. #40486 (comment).

@MaximLipnin
Copy link
Contributor Author

My understanding is that MD5 support was removed and won't be supported in Browser. #40486 (comment).

Seems that I was confused by the browser api exclusion list containing MD5 type and including it to the build for browser target.
Perhaps some additional clean-up might be done here.

@MaximLipnin
Copy link
Contributor Author

@bartonjs I'll fix those style issues

@kjpou1 kjpou1 merged commit b1ca1f4 into dotnet:master Sep 11, 2020
@MaximLipnin MaximLipnin deleted the crypto_unsupported_on_browser branch September 11, 2020 09:43
mdh1418 pushed a commit to mdh1418/runtime that referenced this pull request Sep 15, 2020
…r WASM (dotnet#42010)

* Mark System.Security.Cryptography.Algorithms as unsupported on Browser WASM

* Address the comment regarding IncrementalHash.CreateHMAC

* Group System.* usings

* Restore the blank lines between the meta-comment and the code for all the HMAC classes

* Fix style issues

* Mark MD5 class as unsupported on Browser; clean up the api exclusion list and proj file.

* Using

* Style fix
lewing pushed a commit that referenced this pull request Sep 16, 2020
…hanges (#42267)

* Mark System.IO.Pipes Unsupported at assembly level (#41976)

Co-authored-by: Mitchell Hwang <[email protected]>

* Mark some System.Net.Http APIs as unsupported on browser (#42074)

* Mark some System.Net.HttpListener APIs as unsupported on browser (#42063)

* Mark some System.Net.HttpListener APIs as unsupported on browser

* FIx windows builds

* Fix windows builds

* Remove browser annotations from the properties with windows-specific setters.

* Mark only setter of ExtendedProtectionPolicy

* Remove another redundant annotation

* Mark System.Security.Cryptography.Algorithms as unsupported on Browser WASM (#42010)

* Mark System.Security.Cryptography.Algorithms as unsupported on Browser WASM

* Address the comment regarding IncrementalHash.CreateHMAC

* Group System.* usings

* Restore the blank lines between the meta-comment and the code for all the HMAC classes

* Fix style issues

* Mark MD5 class as unsupported on Browser; clean up the api exclusion list and proj file.

* Using

* Style fix

Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Maxim Lipnin <[email protected]>
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants