Skip to content

Make reading key usages from X509EnhancedKeyUsageExtension thread safe - #136871

Merged
vcsjones merged 1 commit into
dotnet:mainfrom
vcsjones:eku-read-multithreaded
Nov 3, 2026
Merged

vcsjones merged 1 commit into
dotnet:mainfrom
vcsjones:eku-read-multithreaded

Conversation

@vcsjones

@vcsjones vcsjones commented Nov 2, 2026

Copy link
Copy Markdown
Member

X509EnhancedKeyUsageExtension lazily decodes its contents when accessing the EnhancedKeyUsages. If two threads cause this lazy decoding to happen concurrently, they would interfere with each other.

This fixes the decoding to give consistent results even in the presence of multiple threads.

@vcsjones vcsjones added this to the 12.0.0 milestone Nov 2, 2026
@vcsjones
vcsjones requested a review from bartonjs November 2, 2026 21:11
@vcsjones vcsjones self-assigned this Nov 2, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@vcsjones
vcsjones merged commit 8872153 into dotnet:main Nov 3, 2026
95 of 97 checks passed
@vcsjones
vcsjones deleted the eku-read-multithreaded branch November 3, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants