Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a PresentedDNSID type to represented DNS IDs in certificates #66

Open
briansmith opened this issue Jan 10, 2018 · 0 comments
Open

Comments

@briansmith
Copy link
Owner

When investigating an issue mentioned in #65 I thought "Why not change GeneralName::DNSName(untrusted::Input<'a>) to GeneralName::DNSName(DNSNameRef<'a>)?". I started down that path. However, I then was reminded by the code that GeneralName::DNSName is not a DNS name, but a "presented DNS ID." A presented DNS ID can either be a DNS name (DNSNameRef) or it could be a wildcard reference like "*.example.com", which is not a DNSNameRef. Thus we need a new type, something like:

enum PresentedDNSIDRef<'a> {
    DNSName(DNSNameRef<'a>),
    Wildcard(untrusted::Input<'a>),
}

Then GeneralName::DNSName(untrusted::Input) can be changed to GeneralName::DNSName(PresentedDNSID).

Note that this might cause us to recognize invalid DNS names earlier and we should be sure not to change our current behavior (whether it is skipping invalid DNS names or aborting the operation upon an invalid DNS name; I've forgotten).

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

No branches or pull requests

1 participant