Skip to content

Support multi-valued distinguished names#426

Closed
dwhjames wants to merge 1 commit intorustls:mainfrom
dwhjames:multi-value-dn
Closed

Support multi-valued distinguished names#426
dwhjames wants to merge 1 commit intorustls:mainfrom
dwhjames:multi-value-dn

Conversation

@dwhjames
Copy link
Copy Markdown
Contributor

As DistinguishedName has a private internal structure, it is possible to make a backwards compatible change to support multi-valued relative distinguished names, such as for OU, which is the common case.

Existing code that was written with the expectation of strict set semantics will continue to have the same behavior. New functions push_multi, get_all allow the extended behavior.

Parsing via from_name previously returned an error on multi-attribute RDNs (a SET containing more than one attribute/value pair). It now accepts them by flattening each attribute into a separate entry; on round-trip they will be emitted as individual single-attribute RDNs.

As `DistinguishedName` has a private internal structure, it is possible
to make a backwards compatible change to support multi-valued relative
distinguished names, such as for `OU`, which is the common case.

Existing code that was written with the expectation of strict set
semantics will continue to have the same behavior. New functions
`push_multi`, `get_all` allow the extended behavior.

Parsing via `from_name` previously returned an error on multi-attribute
RDNs (a SET containing more than one attribute/value pair). It now
accepts them by flattening each attribute into a separate entry; on
round-trip they will be emitted as individual single-attribute RDNs.
@cpu
Copy link
Copy Markdown
Member

cpu commented Apr 28, 2026

Thanks for the PR.

I don't think adding new disparate API surface is the best path forward for this. I personally prefer #394 and handling this in #418 without consideration for backwards compatibility within 0.14.x.

@dwhjames
Copy link
Copy Markdown
Contributor Author

@cpu thanks for the quick review!
Sorry to you and @djc, I clearly didn’t do a very good job searching the open Issues and PRs 🙃 .

@dwhjames dwhjames closed this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants