Skip to content

Conversation

@vcsjones
Copy link
Member

There are a few places where we take a strongly typed object for an X509Extension, serialize it to bytes, and then pass it to a base constructor, which copies it.

This PR introduces an internal constructor that skips the copy for the places where we know that the data going in to AsnEncodedData can have ownership of the data being passed.

This also adds a cached Oid instance for the AIA extension.

@ghost ghost added the area-System.Security label Jun 10, 2022
@ghost ghost assigned vcsjones Jun 10, 2022
@ghost
Copy link

ghost commented Jun 10, 2022

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

Issue Details

There are a few places where we take a strongly typed object for an X509Extension, serialize it to bytes, and then pass it to a base constructor, which copies it.

This PR introduces an internal constructor that skips the copy for the places where we know that the data going in to AsnEncodedData can have ownership of the data being passed.

This also adds a cached Oid instance for the AIA extension.

Author: vcsjones
Assignees: -
Labels:

area-System.Security

Milestone: -

@vcsjones vcsjones merged commit 7a85d0c into dotnet:main Jun 11, 2022
@vcsjones vcsjones deleted the alloc-x509-less branch June 11, 2022 16:18
@ghost ghost locked as resolved and limited conversation to collaborators Jul 11, 2022
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