Restore `GeneralDnsNameRef`, use in `GeneralName::DnsName`.

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
security

Research direction

Start at the GeneralName::DnsName enum variant and review the upstream work adopted in #42, along with the rationale in webpki#66. Determine whether GeneralDnsNameRef should be restored and used there while preserving the distinction between DnsNameRef and WildcardDnsNameRef. Done means the intended type separation is implemented and its certificate-name behavior is verified.

Written by the indexing model from the issue text.

Description

breaking-change

In #42 we adopted some upstream work that included a new GeneralDnsNameRef enum that had a DnsName variant for a standard DnsNameRef (no wildcards, can be used for subject matching) and a Wildcard variant for a new WildcardDnsNameRef type (wildcards supported, only used in the context of a presented DNS name). The original idea that prompted development of this enum is that it would support changing the GeneralName::DnsName enum variant from holding untrusted::Input to holding GeneralDnsNameRef. This allows more specificity while still maintaining a strong separation between the appropriate uses of the two types of name refs (see https://github.com/briansmith/webpki/issues/66).

We never fully implemented this idea after landing #42 and using it only in the context of iterating certificate SAN dNSNames for informational purposes. We considered exporting the types in https://github.com/rustls/webpki/pull/178 but arrived at a simpler solution whereby we iterate &str and don't need to expose the underlying types. As a result, we removed the GeneralDnsNameRef type entirely as it was unused.

This issue is a reminder that we should consider restoring the GeneralDnsNameRef type and using it for its intended purpose: as part of the GeneralName enum.

Dominant language
Rust
Stars
167
Forks
112
Avg merge
4h 28m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rustls/webpki

All issues in rustls/webpki

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.