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

Enable C# 11 and embed base64 encoded certificates as UTF-8 data #414

Merged
merged 5 commits into from Aug 11, 2023

Conversation

iamcarbon
Copy link
Sponsor Contributor

@iamcarbon iamcarbon commented Jul 31, 2023

Is a bit faster to parse UTF-8 data directly than convert from UTF-16.

NOTE, this uses the built-in support for static data initialization. Accessing ROOT_CERT is non-allocating and refers directly to the data.

This PR also simplifies a check using C# 11 list patterns.

@iamcarbon
Copy link
Sponsor Contributor Author

Ahh, CI doesn't like C# 11. I'll look into this a bit later.

@codecov-commenter
Copy link

codecov-commenter commented Aug 2, 2023

Codecov Report

Merging #414 (dd96eb2) into master (e6567d3) will increase coverage by 0.20%.
The diff coverage is 88.09%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #414      +/-   ##
==========================================
+ Coverage   75.02%   75.23%   +0.20%     
==========================================
  Files          95       95              
  Lines        2751     2782      +31     
  Branches      457      458       +1     
==========================================
+ Hits         2064     2093      +29     
+ Misses        575      574       -1     
- Partials      112      115       +3     
Files Changed Coverage Δ
Src/Fido2/Extensions/X509CertificateHelper.cs 75.00% <50.00%> (-2.78%) ⬇️
...c/Fido2/Metadata/Fido2MetadataServiceRepository.cs 65.51% <90.47%> (+7.94%) ⬆️
...rc/Fido2/Metadata/ConformanceMetadataRepository.cs 88.18% <100.00%> (+1.12%) ⬆️

... and 2 files with indirect coverage changes

@iamcarbon iamcarbon changed the title Embed base64 encoded certificates as UTF-8 data Enable C# 11 and embed base64 encoded certificates as UTF-8 data Aug 2, 2023
@iamcarbon
Copy link
Sponsor Contributor Author

iamcarbon commented Aug 2, 2023

future note: We should also consider cross-targeting and testing against net8.0 after Preview 7 or RC1. This will also provide us with the latest System.Text.Json source generation improvements.

@iamcarbon
Copy link
Sponsor Contributor Author

@abergs Ready for review.

@abergs abergs self-requested a review August 10, 2023 15:09
Copy link
Collaborator

@abergs abergs left a comment

Choose a reason for hiding this comment

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

Looks good, thank you @iamcarbon

@abergs abergs merged commit 285a611 into passwordless-lib:master Aug 11, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants