Skip to content

Add AddRegisteredId to SubjectAlternativeNameBuilder#126900

Merged
vcsjones merged 1 commit intodotnet:mainfrom
vcsjones:registered-id-asn
Apr 15, 2026
Merged

Add AddRegisteredId to SubjectAlternativeNameBuilder#126900
vcsjones merged 1 commit intodotnet:mainfrom
vcsjones:registered-id-asn

Conversation

@vcsjones
Copy link
Copy Markdown
Member

Fixes #125127

Copilot AI review requested due to automatic review settings April 14, 2026 18:58
@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.

Copy link
Copy Markdown
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

Adds support for adding a Registered ID (OID) GeneralName to SubjectAlternativeNameBuilder, enabling Subject Alternative Name (SAN) construction scenarios that require registeredID entries.

Changes:

  • Added SubjectAlternativeNameBuilder.AddRegisteredId(string registeredId) API.
  • Added unit tests covering argument validation, valid encoding, invalid OID handling, and mixed multi-value SANs.
  • Updated the reference assembly to expose the new public API.
Show a summary per file
File Description
src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/SubjectAlternativeNameBuilder.cs Adds the new AddRegisteredId API and routes it through GeneralNameAsn.RegisteredId.
src/libraries/System.Security.Cryptography/tests/X509Certificates/CertificateCreation/SubjectAltNameBuilderTests.cs Adds coverage for registered ID encoding and invalid OID input behavior.
src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs Exposes AddRegisteredId(string) in the public ref surface.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

@vcsjones vcsjones added this to the 11.0.0 milestone Apr 14, 2026
@vcsjones vcsjones merged commit e0fb1f9 into dotnet:main Apr 15, 2026
97 of 102 checks passed
@vcsjones vcsjones deleted the registered-id-asn branch April 15, 2026 03:11
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.

[API Proposal]: Add Registered ID attribute to SubjectAlternativeNameBuilder

3 participants