Skip to content

Stackalloc cert handles in SafeDeleteSslContext.SetCertificate on macOS#123905

Merged
stephentoub merged 2 commits intodotnet:mainfrom
stephentoub:safedeletealloc
Feb 3, 2026
Merged

Stackalloc cert handles in SafeDeleteSslContext.SetCertificate on macOS#123905
stephentoub merged 2 commits intodotnet:mainfrom
stephentoub:safedeletealloc

Conversation

@stephentoub
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 2, 2026 18:27
@dotnet-policy-service
Copy link
Contributor

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

@stephentoub stephentoub enabled auto-merge (squash) February 2, 2026 18:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Optimizes macOS TLS certificate chain setup by attempting to avoid heap allocations when building the certificate handle list for SSLSetCertificate.

Changes:

  • Introduces a stackalloc/heap fallback strategy for the certificate handle buffer in SafeDeleteSslContext.SetCertificate.
  • Adds a local threshold constant to control when stack allocation is used.

@stephentoub
Copy link
Member Author

/ba-g timeouts

@stephentoub stephentoub merged commit 57df552 into dotnet:main Feb 3, 2026
84 of 89 checks passed
@stephentoub stephentoub deleted the safedeletealloc branch February 3, 2026 02:31
lewing pushed a commit to lewing/runtime that referenced this pull request Feb 9, 2026
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.

3 participants