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

Improve use of PAL's RawData for X509Certificate #103828

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

vcsjones
Copy link
Member

This change pushes down the memoization of RawData from X509Certificate2 to X509Certificate (so we don't have it memoized twice). This is because the RawData property on the ICertificatePal may allocate, such as the case of the OpenSSL PAL.

Since the memoized value is available in the base X509Certificate, use it where appropriate such as creating the hash of a certificate. This also makes a small optimization of using the stack for the intermediate bytes between the hash and the hex value.

See #103814 for some background.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

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.

2 participants