Skip to content

[API Proposal]: Add Registered ID attribute to SubjectAlternativeNameBuilder #125127

@Harmyder

Description

@Harmyder

Background and motivation

I'm working on MDM solution and trying to move all old code to .NET. Here I'm stuck with SAN because SubjectAlternativeNameBuilder doesn't support Registered ID.

API Proposal

namespace System.Security.Cryptography.X509Certificates;

public sealed class SubjectAlternativeNameBuilder
{
	public void AddRegisteredID(string registeredId)
	{
		AddGeneralName(new GeneralNameAsn
		{
			RegisteredId= registeredId
		});
	}

API Usage

var san = new SubjectAlternativeNameBuilder();
san.AddRegisteredID(value);

Alternative Designs

No response

Risks

Should be easy because GeneralNameAsn already has support for this attribute.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions