KEMBAR78
Improve use of PAL's RawData for X509Certificate by vcsjones · Pull Request #103828 · dotnet/runtime · GitHub
Skip to content

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.

@dotnet-policy-service
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